Solved

is it right?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

867 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

17 Experts available now in Live!

Get 1:1 Help Now