Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2000071

[PHP] HELP!!! From: Joel Johnston (strobe <email protected>)
Date: 07/05/00

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>";
                         }

                         ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>