HELP!!!
| From: | Joel Johnston | Date: | Wed, 05 Jul 2000 23:04:31 +0000 |
| Subject: | HELP!!! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-5091@lists.php.net to get a copy of this message | ||
I'm a newbie!! now that thats outta the way, I need help. I'm trying to
do a simple query to my MySQL datasource. Whenever I do a query and try
to report anything from the results I get the following error.
Warning: 0 is not a MySQL result index in
/usr/local/etc/httpd/htdocs/sanddollarauto.com/php3/testconnect.php3 on
line 23
It doesn't matter what the query contains or how it is output. I get
this error no matter what I do. I'm a Cold Fusion Developer and am new
to PHP but shouldn't the following code work?
<?php
$dbuser = 'root';
$dbhost = 'localhost';
$dbpass = 'password';
$dbname = 'sand';
$dbtble = 'new_cars';
$mysql_link = mysql_connect();
$column =
mysql_list_fields($dbname,$dbtble,$mysql_link);
{
print mysql_field_name($column,1)."<br>";
}
?>