substring_index Part 2

From: Date: Thu, 12 Apr 2001 16:53:39 +0000
Subject: substring_index Part 2
Groups: php.db 
Request: Send a blank email to php-db+get-8519@lists.php.net to get a copy of this message
Thanks for the help on the earlier ?. Now that I have the select statement working I can't get any results displayed. $result = mysql_query("SELECT substring_index(body, \".\" ,2) FROM news",$db) or die ("Invalid Query"); if ($myrow = mysql_fetch_array($result)) { do { printf("%s\n<br>", $myrow["headline"]); printf("%s\n", $myrow["body"]); } while ($myrow = mysql_fetch_array($result)); I've tried different mysql functions like mysql_result and mysql_fetch_row, All I get is a blank page in the browser or a wrong parameter count for mysql_result(). I know there are records to display i've done the query using the mysql client. Thanks again for the help, Mike

« previous php.db (#8519) next »