php-db | 2001041
Date: 04/12/01
- Next message: Paul Burney: "Re: [PHP-DB] build drop-down pick from MYSQL table"
- Previous message: Quentin Krengel: "[PHP-DB] build drop-down pick from MYSQL table"
- Next in thread: Paul Burney: "Re: [PHP-DB] substring_index Part 2"
- Reply: Paul Burney: "Re: [PHP-DB] substring_index Part 2"
- Reply: Ron Brogden: "Re: [PHP-DB] substring_index Part 2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Paul Burney: "Re: [PHP-DB] build drop-down pick from MYSQL table"
- Previous message: Quentin Krengel: "[PHP-DB] build drop-down pick from MYSQL table"
- Next in thread: Paul Burney: "Re: [PHP-DB] substring_index Part 2"
- Reply: Paul Burney: "Re: [PHP-DB] substring_index Part 2"
- Reply: Ron Brogden: "Re: [PHP-DB] substring_index Part 2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

