Active FAQs

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Active FAQs
bxfl
CZ Super Newbie
bxfl has been a member for over 20 year's 20 Year Member
Gender: Female
Website:
Status: Offline
Joined: Mar 22, 2004
0.01 posts per day
Posts: 60
Points: 2,594
AIM Address   
Under Active FAQs, I keep getting this:





Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/co59com/public_html/includes/sql_layer.php on line 286




How can I fix this?



Back to top Reply with quote
#2   re: Active FAQs
Milkman
CZ Super Newbie
Gender: Male
Status: Offline
Joined: Dec 28, 2003
0.01 posts per day
Posts: 45
Points: 2,228
   
Can you post that line of code please?



Back to top Reply with quote
#3   re: Active FAQs
bxfl
CZ Super Newbie
bxfl has been a member for over 20 year's 20 Year Member
Gender: Female
Website:
Status: Offline
Joined: Mar 22, 2004
0.01 posts per day
Posts: 60
Points: 2,594
AIM Address   

LINE  280: function sql_fetch_row(&$res, $nr=0)
{
global $dbtype;
switch ($dbtype) {

    case "MySQL":
LINE 286:        $row = mysql_fetch_row($res);
        return $row;
    break;;

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

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


The "LINE" tags I just put in there for your reference


Back to top Reply with quote
#4   re: Active FAQs
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
first off, either you copied it wrong or something got corrupted in the file. look closely to what you posted:


LINE  280: function sql_fetch_row(&$res, $nr=0)
{
global $dbtype;
switch ($dbtype) {

    case "MySQL":
LINE 286:        $row = mysql_fetch_row($res);
        return $row;
    break;;

    case "mSQL":


LINE 280 : case "MySQL":
LINE 286: case "mSQL":


Back to top Reply with quote
#5   re: Active FAQs
bxfl
CZ Super Newbie
bxfl has been a member for over 20 year's 20 Year Member
Gender: Female
Website:
Status: Offline
Joined: Mar 22, 2004
0.01 posts per day
Posts: 60
Points: 2,594
AIM Address   
Isn't mSQL a different form of MySQL, and "case' means, "in case of having mSQL"? Because the lines after that go like this:


function sql_fetch_row(&$res, $nr=0)
{
global $dbtype;
switch ($dbtype) {

    case "MySQL":
        $row = mysql_fetch_row($res);
        return $row;
    break;;

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


See how the "row" says "msql_fetch_row"? It uses mSQL again.
Just a thought (although I know nearly nothing about PHP) icon_smile.gif
Thanks in advance!


Back to top Reply with quote
#6   re: Active FAQs
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
oops forgive me as I have not quite memorized that page yet and all it's contents.

This is a very general error. Most of the time it just means that you could not connect to the database. To get a better error message, edit

from this:
case "MySQL":
        $row = mysql_fetch_row($res);
        return $row;
    break;;




to this:

case "MySQL":
        if ($row = mysql_fetch_row($res)) {
           return $row;
        } else {
           print (mysql_error());
        }
    break;;



This will NOT fix your problem. But it will give a more descriptive message as to what the error cause is and thus be able to narrow down the fix for it


Back to top Reply with quote
#7   re: Active FAQs
bxfl
CZ Super Newbie
bxfl has been a member for over 20 year's 20 Year Member
Gender: Female
Website:
Status: Offline
Joined: Mar 22, 2004
0.01 posts per day
Posts: 60
Points: 2,594
AIM Address   
New error says:




Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/co59com/public_html/includes/sql_layer.php on line 286
Table 'co59com_nuke.nuke_faqCategories' doesn't exist




Back to top Reply with quote
#8   re: Active FAQs
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
[ Register or login to view links on this board. ]


about 3/4 down the topic.



Back to top Reply with quote
#9   re: Active FAQs
bxfl
CZ Super Newbie
bxfl has been a member for over 20 year's 20 Year Member
Gender: Female
Website:
Status: Offline
Joined: Mar 22, 2004
0.01 posts per day
Posts: 60
Points: 2,594
AIM Address   
The download links give me 404 errors icon_sad.gif



Back to top Reply with quote
#10   re: Active FAQs
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
re-dl the sql for the nuke version you have. also, the topic I gave you the link for, the dl's in that topic has been fixed



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