Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

is it right?

Posted on 2009-07-10
1
Medium Priority
?
137 Views
Last Modified: 2012-05-07
is it right ?
echo $sql="select * from $tname";
        $qid = mysql_query($sql);
        if(mysql_num_rows($qid) > 0) {
		  while($rec = mysql_fetch_array($qid)){
				echo "testing";
				echo $rec['title'];
				echo $title_value = $rec['title'];
				$content_value = $rec['content'];
		  }
        }
		else{
        	$content_value = '';
	        $title_value = '';
    	}

Open in new window

0
Comment
Question by:designersx
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 24822618
depends on the fact if your query can return more than 1 row, and what should happen in that case...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question