1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

MySql 4.x to 5.0.18

Discussion in 'MySQL' started by donteatchicken, May 27, 2006.

  1. #1
    This select statement now gives me an error after upgrading to PHP 5.0.18

     SELECT * from entries where CatID='$catid' and validated='1'
     order by out DESC limit $start,$numentries 
    Code (markup):
    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 'out DESC limit 0,8' at line 1

    Any Ideas?

    TIA
     
    donteatchicken, May 27, 2006 IP
  2. anjanesh

    anjanesh Well-Known Member

    Messages:
    343
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    165
    #2
    The version of PHP has nothing to do with this.
    Try this sql statement :
    
    SELECT * FROM `entries` 
    WHERE `CatID` = '$catid' AND `validated` = '1' 
    ORDER BY `out` DESC LIMIT $start, $numentries
    
    Code (markup):
     
    anjanesh, May 27, 2006 IP
    donteatchicken likes this.
  3. donteatchicken

    donteatchicken Well-Known Member

    Messages:
    432
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    118
    #3
    You rock man, thank you.
     
    donteatchicken, May 28, 2006 IP