Hi
I am attempting to get the data from one column of a mySQL database back to php and use implode to arrange it into a string to insert into a script. The script part runs perfectly when the info is input manually but I am unable to get the mySQL to PHP bit working. The code is as follows:
$db = mysql_connect("localhost", "root", "irnbru");
mysql_select_db("helpdesk_calls",$db);
$query = 'SELECT calls FROM Yr2004';
$r = mysql_query($query);
$string = implode (", ", $r);
Many thanks.
mySQL, PHP and Abyss web server running on a Windows 2000 platform.
I am attempting to get the data from one column of a mySQL database back to php and use implode to arrange it into a string to insert into a script. The script part runs perfectly when the info is input manually but I am unable to get the mySQL to PHP bit working. The code is as follows:
$db = mysql_connect("localhost", "root", "irnbru");
mysql_select_db("helpdesk_calls",$db);
$query = 'SELECT calls FROM Yr2004';
$r = mysql_query($query);
$string = implode (", ", $r);
Many thanks.
mySQL, PHP and Abyss web server running on a Windows 2000 platform.