@Kyleva2204Dec 08.2003 — #err close ? try this: [code=php] $sql = "select * from database order by date desc limit 0, 15"; mysql_query($sql, $connect) or die(mysql_error()); [/code] Now I'm not sure but I always define $connect with the mysql_connect function like this: [code=php] $connect = mysql_connect(me, pass, localhost); [/code] but u almost had it.
[i]Originally posted by Jonathan [/i]
[B]I am wonderin if this is the correct syntax to select the most current data within the database... here:
<i> </i>mysql_query("select * from database order by date desc limit 0, 15"); [/B][/QUOTE]
@Kyleva2204Dec 08.2003 — #O hmmm pconnect cool. I'm a starter at PHP and I always used connect. wow thanks turns out u tought me sumtin :rolleyes:. Anyway this is just a snipplet of it: [code=php] SELECT * FROM comments WHERE 1 ORDER BY Name DESC LIMIT 0 , 30 [/code] ^ correct
[i]Originally posted by Jonathan [/i]
[B]Isn't the exact same thing? ?
I didn't include the mysql connection. I was just wonderin if that was how you grab something (the last 15 in decending order)