Author Topic: Warning: mysql_num_rows()  (Read 6341 times)

0 Members and 1 Guest are viewing this topic.

Offline Semi Kolon

  • Newbie
  • *
  • Posts: 20
  • Doodling is geil :P
    • View Profile
    • doodling.DE - express yourself!
Warning: mysql_num_rows()
« on: February 07, 2009, 03:53:31 PM »
Hey,
i'm fighting an error for almost an hour but i can't find out what is wrong.

the "warning" is:
Code: [Select]
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/***/html/***/4images/includes/functions.php on line 527
installed mods are: SMF bridge and Ajaxs Starrating
(same order)
all happened after i installed the starrating.
i tried to "//" (comment out) the line and i thought it works problem is then i get different errors on search page because he doesn't find the voted variable anymore.

i hope anyone can help me :)

i found similiar problems in the search here but nothing worked...

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Warning: mysql_num_rows()
« Reply #1 on: February 07, 2009, 04:09:01 PM »
Hi,

db tables and php db- tables-request is missmatched
What code is in this line?


Kurt

Offline Semi Kolon

  • Newbie
  • *
  • Posts: 20
  • Doodling is geil :P
    • View Profile
    • doodling.DE - express yourself!
Re: Warning: mysql_num_rows()
« Reply #2 on: February 07, 2009, 04:11:42 PM »
Hey Kurt,

this is the line.
Quote
$voted=mysql_num_rows(mysql_query("SELECT image_used_ips FROM ".IMAGES_TABLE." WHERE image_used_ips LIKE '%".$ip."%' AND image_id='".$image_id."' "));

thanks for the fast respond!

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Warning: mysql_num_rows()
« Reply #3 on: February 07, 2009, 04:31:43 PM »
have you install the new db table: image_used_ips in IMAGES_TABLE ?

Offline Semi Kolon

  • Newbie
  • *
  • Posts: 20
  • Doodling is geil :P
    • View Profile
    • doodling.DE - express yourself!
Re: Warning: mysql_num_rows()
« Reply #4 on: February 07, 2009, 04:45:23 PM »
yeah, image_used_ips and  image_used_ids are both in there

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Warning: mysql_num_rows()
« Reply #5 on: February 07, 2009, 05:57:03 PM »
Please reply to the appropriate topic, that line is not part of 4images.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: Warning: mysql_num_rows()
« Reply #6 on: May 03, 2009, 11:36:32 PM »
I have found my self in the same situation as you and just found this thread while searching for an answer. I have installed the smf mod and the ajax star and am recieving the same error. Did you fix it ever? How??
As long as I can finish my site before I die.