Posted by:
JackP
(---.range81-153.btcentralplus.com)
Hi,
i recently installed WAMP5 with the intention of testing databases through
my Macomedia Flash swf files.
I checked that PHP was working with a simple file that echo'd variables
back to the Flash interface, and all works fine
I set up a simple database with MySQL named my_sites, with a table - sites
I wrote a simple PHP file to connect and return the information and placed
it in my www folder -
<?php
$dbhost = 'localhost';
mysql_connect($dbhost);
$db = mysql_select_db("my_sites"
;
$qResult = ("SELECT * FROM sites ORDER BY id ASC"
;
$nRows = mysql_num_rows($qResult);
$rString ="&n=".$nRows;
for ($i=0; $i< $nRows; $i++){
$row = mysql_fetch_array($qResult);
$rString .="&id".$i."=".$row['id']."&"."&title".$i."=".$row['title']."&".
"&link".$i."=http://".$row['link']."&";
}
echo $rString."&";
?>
When i run the Flash file, I receive these errors in the output window -
mysql_connect() - Access denied for user 'ODBC'@'localhost' (using password: NO)
mysql_select_db() - Access denied for user 'ODBC'@'localhost' (using password: NO)
mysql_select_db() - A link to the server could not be established
mysql_num_rows(): supplied argument is not a valid MySQL result resource
all files from the installation are original with no changes made
i have mysql-connector-odbc-3.51.15 installed on my system
can anyone shed some light on why I am recieving these errors ?
Thanks to anyone who can spare the time to help,
Jack.