Re: [PHP] DB row selection

2003-02-19 Thread Hans Prins
Thanks a lot guys, the feedback so far has been most usefull Hans "Joel Colombo" <[EMAIL PROTECTED]> schreef in bericht [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > same thing > > $query = "SELECT * FROM polls ORDER BY pollID DESC LIMIT 1"; > > dont need both params for LIMIT. just the num

Re: [PHP] DB row selection

2003-02-19 Thread Richard Whitney
You might want to look at mysql_data_seek() HTH RVW Quoting Hans Prins <[EMAIL PROTECTED]>: ### Hello, ### I recently learnt that with the code as stated below, I can select one ### row: ### ### $query = "SELECT * FROM polls ORDER BY pollID ASC LIMIT 0,1"; ### ### However as far as I could fi

Re: [PHP] DB row selection

2003-02-19 Thread Joel Colombo
same thing $query = "SELECT * FROM polls ORDER BY pollID DESC LIMIT 1"; dont need both params for LIMIT. just the num of rows u want back works too. Joel "Hans Prins" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > That's weird.. that was the

Re: [PHP] DB row selection

2003-02-19 Thread Hans Prins
That's weird.. that was the first thing I tried (DESC), but it gave me a syntax error at runtime.. however, when I tried it now, it worked.. I probably had another error that confused me. Thx a bunch :-) "Ernest E Vogelsinger" <[EMAIL PROTECTED]> schreef in bericht [EMAIL

Re: [PHP] DB row selection

2003-02-19 Thread Ernest E Vogelsinger
At 10:57 19.02.2003, you said: [snip] >Hello, >I recently learnt that with the code as stated below, I can select one row: > >$query = "SELECT * FROM polls ORDER BY pollID ASC LIMIT 0,1"; > >However as far as I could figure out, I can only select the top row

[PHP] DB row selection

2003-02-19 Thread Hans Prins
Hello, I recently learnt that with the code as stated below, I can select one row: $query = "SELECT * FROM polls ORDER BY pollID ASC LIMIT 0,1"; However as far as I could figure out, I can only select the top row or tell it at what rownumber to start and end. What if I wanted to select the bottom