Jump to content

I want to check a Table


Scorpion28

Recommended Posts

This is suppose to check a table to see if it has a value in it.  I get this error:

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /homepages/6/d365637117/htdocs/EE Live/Active/Inc/session.php on line 33

 

 

This is the code

if($checkProfile)

{

    $result = mysql_query("SELECT prof_pic FROM members_profile WHERE id = '".$_SESSION['EEID']."'");

$mem_num_rows = mysql_num_rows($result);

if($mem_num_rows =1)

{

 

 

}

Link to comment
Share on other sites

Your query is failing. Either you have not connected to the db properly or there is a typo in your query. Try using this to see what the error is

    $query = "SELECT prof_pic FROM members_profile WHERE id = '".$_SESSION['EEID']."'";
    $result = mysql_query($query) or die("Query: {$query}<br>Error: " . mysql_error());
    $mem_num_rows = mysql_num_rows($result);
    if($mem_num_rows =1

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.