mysql_fetch_array() PHP Error When Putting Values in table

Discussion in 'PHP' started by LindseyInteractive, Dec 30, 2011.

  1. #1
    Hello,

    I keep getting the following error when trying to query the database to put the values into a table:

    Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\sismedia\admin\modules\orders_and_invoices\services\view.php on line 50

    Below is the code:

     
    LindseyInteractive, Dec 30, 2011 IP
  2. Basti

    Basti Active Member

    Messages:
    625
    Likes Received:
    6
    Best Answers:
    3
    Trophy Points:
    90
    #2
    Somewhere the query is failing, enable the error handling on the query to get a more detailed msg.

    
    $result=mysql_query($sql)or die(mysql_error());
    
    Code (markup):
     
    Basti, Dec 30, 2011 IP
  3. LindseyInteractive

    LindseyInteractive Well-Known Member

    Messages:
    2,830
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    175
    #3
    I figured it out, it was a misspelling with the table name.
     
    LindseyInteractive, Dec 31, 2011 IP