Re: [PHP] select distinct mysql

2002-08-16 Thread Analysis & Solutions
On Thu, Aug 15, 2002 at 01:12:59PM +0300, kale wrote: > > SELECT *, DISTINCT name FROM history ORDER date DESC, time DESC LIMIT 10 > > but this not work. how can I do this? I use a mysql server. That's because your query string syntax is all messed up. Put a mysql_error() call in your script a

[PHP] select distinct mysql

2002-08-15 Thread kale
hy, I have a tabel (history) with fields: id (uniq), date, time, name, etc. I want to select after next rules: - date and time been sort descendent - only 10 recording - value of the field name to be unique syntax must be something this: SELECT *, DISTINCT name FROM history ORDER date DESC, time