Solved

is it right?

Posted on 2009-07-10
1
127 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 142

Accepted Solution

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

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to dynamically set the form action using jQuery.
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 …

744 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now