This code produces an error on line 8 (while...). Any ideas why? I'm fairly sure the syntax is correct, so what's the issue?
As soon as I get it working hard coded like that, I'll replace the query with variables, so it'll be more useful than for this one search.
[This message was edited by clm100 on January 30, 2002 at 19:25.]
code:<HR>Code:<html> <body> <?php $db = mysql_connect("localhost","/*no you can't find out who I am */","/*nor my password!*/"); mysql_select_db("ben",$db); $query = "SELECT * FROM scheds WHERE p7 LIKE 17440003"; $results = "mysql_query($query,$db)"; while ($myrow = mysql_fetch_array($results)) { /* printf ("%s ", $myrow["uname"]); */ $uname = $myrow["uname"]; echo "$uname"; } ?> </body> </html>
As soon as I get it working hard coded like that, I'll replace the query with variables, so it'll be more useful than for this one search.
[This message was edited by clm100 on January 30, 2002 at 19:25.]