Current location: Hot Scripts Forums » Programming Languages » PHP » NEED HELP - Warning: mysql_fetch_array(): supplied argument is not a valid MySQL r


NEED HELP - Warning: mysql_fetch_array(): supplied argument is not a valid MySQL r

Reply
  #1 (permalink)  
Old 08-18-04, 10:40 PM
ArgonX ArgonX is offline
New Member
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Post NEED HELP - Warning: mysql_fetch_array(): supplied argument is not a valid MySQL r

Hello,

I have some problem with php and getting this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource
in /home/xxx/public_html/xxxex/include/functions.php on line 240

The Line 240 is :

if (!$Row=mysql_fetch_array($Result))


DOES anyone know what is error here...

full code... -->

// Legge da file le informazioni riguardanti il file specificato in upload
//
function get_file_description($filename, $max_caracters = 0, $replacecharacters = 1)
{
global $DBName, $DBLink;

$Query= "SELECT * from fileinfo where filename='$filename'";
$Result= @mysql_db_query($DBName,$Query,$DBLink);
if (!$Row=mysql_fetch_array($Result)) --- line 240
{
return array('','','');
} else
{
Reply With Quote
  #2 (permalink)  
Old 08-18-04, 10:51 PM
Keith's Avatar
Keith Keith is offline
Community Liaison
 
Join Date: Feb 2004
Posts: 1,232
Thanks: 1
Thanked 11 Times in 11 Posts
I don't think the exclamation point can be there.
Reply With Quote
  #3 (permalink)  
Old 08-19-04, 04:34 AM
v1brazy v1brazy is offline
Newbie Coder
 
Join Date: Jan 2004
Location: Newcastle - UK
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Try

if (!($Row=mysql_fetch_array($Result)))

peace!!
Reply With Quote
  #4 (permalink)  
Old 08-19-04, 10:26 AM
ArgonX ArgonX is offline
New Member
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
hmm

I try both and it didnt work. I still have thiss error. The script is working , i just have this error that really bother me.
Reply With Quote
  #5 (permalink)  
Old 08-19-04, 01:59 PM
darkfreak's Avatar
darkfreak darkfreak is offline
Newbie Coder
 
Join Date: Jun 2004
Location: Kuopio, Finland, Europe
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by ArgonX
$Query= "SELECT * from fileinfo where filename='$filename'";
$Result= @mysql_db_query($DBName,$Query,$DBLink);
You could probably get some more info on errors if didn't use the @ before your code actually works.

From PHP manual:
Quote:
resource mysql_db_query ( string database, string query [, resource link_identifier ] )
Note:
This function has been deprecated since PHP 4.0.6. Do not use this function. Use mysql_select_db() and mysql_query() instead.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
mysql_fetch_array(): supplied argument is not a valid MySQL result resource... Dion PHP 3 07-16-04 03:48 AM
Supplied argument is not a valid MySQL result resource help aequo PHP 2 06-15-04 08:13 AM
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result ... hukka PHP 1 01-12-04 12:16 AM
wwwboard style board with modern functionality? complexprocess General HotScripts Site Discussion 11 09-03-03 03:15 AM


All times are GMT -5. The time now is 04:22 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.