Re: Why can't this code display my result?

From: Date: Fri, 10 Aug 2001 05:19:15 +0000
Subject: Re: Why can't this code display my result?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62113@lists.php.net to get a copy of this message
On Fri, 11 Feb 2000 09:36, Ardani Sarjito wrote: > hi everyone! > > I'm new to PHP. > > I don't know why I can't make this page work. > it doesn't show my search result. > > Any help would be appreciated. > This script is driving me nuts! :-) > > Thanks! > > <?php > $connect = mysql_connect("localhost","user_name","password"); > $select_data = mysql_select_db("ardani_cd_collection"); > $query = "SELECT * FROM main where description = '$song_title'"; > $result = mysql_query($query); > > while($row = mysql_fetch_row($result)) > {echo "<table > > border='1'>","<TR>","<TD>",$row[1],"</TD>","<TD>",$row[2],"</TD>","<TD> >",$ro > > w[3],"</TD>","<TD>",$row[4],"</TD>","<TD>",$row[5],"</TD>","</TR>","</t >able> ";} > ?> 1 Try echoing your query and pasting it into a mysql console and see what happens (if you have console access) or at least see if the echoed query is logical. 2 View the source and see if there is anything there 3 Use mysql_num_rows() and echo the number of rows returned. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I have a 33.6Kbps modem and 1.5bps fingers

« previous php.general (#62113) next »