SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Need help understanding SQL error

    Can someone help me understand what "Resource id #7" refers to? My line #1 is simply <?php

    Thanks!


    A fatal MySQL error occured.
    Query: select count(*) as total from testimonies where author = '17619' and approved = 'Yes'

    Error: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #7' at line 1
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,501
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Can you post some code?

  3. #3
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I got it worked out. Thanks.
    Convert your dollars into silver coins. www.convert2silver.com

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,501
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Could you tell us what it was?

  5. #5
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I was using a different way of executing the mysql. I looked around on some of my other pages and copied the way that I had used there. That did the trick. I don't know this stuff well enough to pinpoint why that original code was producing that weird message.
    Convert your dollars into silver coins. www.convert2silver.com

  6. #6
    SitePoint Wizard guelphdad's Avatar
    Join Date
    Oct 2003
    Location
    St. Catharines, ON Canada
    Posts
    1,708
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The error was PHP related and was because the OP tried to access the database output directly instead of through mysql_fetch_row/array etc.


Bookmarks

Posting Permissions

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