Re: Strange error on mysql_fetch_array

From: Date: Wed, 27 Jun 2001 08:22:20 +0000
Subject: Re: Strange error on mysql_fetch_array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-55340@lists.php.net to get a copy of this message
> How can the resource be invalid if I'm getting the results back? I'd > appreciate any explaination. What results are you getting?... > $connection_id = @mysql_connect ('localhost', 'root') or die('No > connection.'); > $database_id = @mysql_select_db ('cgcms', $connection_id) or die('No > connection.'); > > ... > > $result_id = @mysql_query("DESC $table_name $field_name"); I don't think "DESC $table_name $field_name" is valid SQL, is it?... DESC is DESCENDING in an ORDER BY clause... Perhaps if you used DESCRIBE?... Is that what you are doing?... There are built-in functions for getting the table definitions and so forth. They may work better... > $row = mysql_fetch_array($result_id); # This is line 9 -- WARNING richard@zend.com address is an endangered species -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#55340) next »