SQL array error for classifieds mod

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   SQL array error for classifieds mod
sabastina
CZ Active Member
Occupation: College Student
Website:
Status: Offline
Joined: Nov 03, 2003
0.03 posts per day
Posts: 212
Points: 120,520
AIM Address Yahoo Messenger MSN Messenger ICQ Number
HI guys,

This is a strange error...because the module seems to work just fine except for this one error...
[ Register or login to view links on this board. ]

This occoured after I submitted a test ad. Said the ad was submitted then gave this as well:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site64/fst/var/www/html/includes/sql_layer.php on line 342

The lines that it refers to are (342 is in Red):

return $row;
break;;

default:
break;;
}
}

/*
* sql_fetch_array($res,$row)
* given a result identifier, returns an associative array
* with the resulting row using field names as keys.
* Needs also a row number for compatibility with postgres.
*/

function sql_fetch_array(&$res, $nr=0)
{
global $dbtype;
switch ($dbtype)
{
case "MySQL":
$row = array();
$row = mysql_fetch_array($res);
return $row;
break;;

case "mSQL":
$row = array();
$row = msql_fetch_array($res);
return $row;
break;;

case "postgres":
case "postgres_local":
if( $res->get_total_rows() > $res->get_fetched_rows() ) {
$row = array();
$row = pg_fetch_array($res->get_result(), $res->get_fetched_rows() );
$res->increment_fetched_rows();
return $row;
} else {
return false;
}
break;;

/*
* ODBC doesn't have a native _fetch_array(), so we have to
* use a trick. Beware: this might cause HUGE loads!
*/

case "ODBC":
$row = array();
$result = array();
$result = odbc_fetch_row($res, $nr);
$nf = odbc_num_fields($res); /* Field numbering starts at 1 */
for($count=1; $count < $nf+1; $count++)
{
$field_name = odbc_field_name($res, $count);
$field_value = odbc_result($res, $field_name);
$row[$field_name] = $field_value;
}
return $row;
break;;

case "ODBC_Adabas":
$row = array();
$result = array();
$result = odbc_fetch_row($res, $nr);




Any help is appreciated greatly.

Sabastina



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Please ask at the site that produces this script I am not familiar with it.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
sabastina
CZ Active Member
Occupation: College Student
Website:
Status: Offline
Joined: Nov 03, 2003
0.03 posts per day
Posts: 212
Points: 120,520
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Ok thanks!

Appreciate the help.

Sabastina



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum