Solved

is it right?

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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why do people dis php? 5 50
PHP populating an array. 4 25
PHP-Client-Registration-Login article and  saving last last login 6 29
Showing random records from database 10 37
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.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

772 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