Hello, I am trying this code out but has error. Please help,
This is my code.
<?php
include 'dbFunctions.php';
$result = mysql_query('select * from criteria_m');
if (!$result){
die('Query failed: ' . mysql_error());
}
$i = 0;
while ($i < mysql_num_fields($result)){
echo"information for column $i:<br />\n";
$meta = mysql_fetch_field($result, $i);
if(!$meta){
echo"no information available<br />\n";
}
echo "<pre>
example 1: $meta
example 2: $meta
</pre>";
$i++;
}
?>
The error message i got is this,
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\LEOtest\index.php on line 11
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\xampp\htdocs\LEOtest\index.php on line 11
Query failed: Access denied for user 'ODBC'@'localhost' (using password: NO)
Thank you.