Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Reply to Thread

Post a reply to the thread: PLEASE HELP, I CANT FIGURE THIS PHP ERROR OUT!?

Your Message

Click here to log in

In what corner do we have Search box?

 
 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Rate Thread

You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.

Topic Review (Newest First)

  • 12-07-2011, 07:43 AM
    Jerry

    PLEASE HELP, I CANT FIGURE THIS PHP ERROR OUT!?

    I got this error after writing PHP:
    Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\LikeButton\core\func\lik... on line 9

    Here is my code:
    return (mysql_result(mysql_query("SELECT COUNT (`like_id`) FROM `likes` WHERE `user_id` = ".$_SESSION['user_id']." AND `article_id` = $article_id"), 0) == 0) ? false : true;
    Which Outputs The Error And Doesn't return what i've told it too: 'You've Already Like This'

    However when i have deleted the ==0 It Returns 'You've Already Liked This', but still gives me the error

    If You Can't Tell The Problem, Could You Atleast Point Me In The Direction Or Tell Me Whats worng/what the error means?

    Thanks For Reading
    think it has something to do with the end of the statement, but im just not sure at all

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •