Forum Moderators: coopster
I'm with problem in database. look:
$query = mysql_query("SELECT * FROM images WHERE id_cat="$cat" ORDER BY id_cat DESC");
The database return:
id_cat - name_cat
4 -------- Cars
3 -------- Sport
2 -------- Nature
1 -------- Cars
I make
$query = mysql_query("SELECT * FROM images WHERE id_cat="$cat" GROUP BY name_cat ORDER BY id_cat DESC");
Hide the id_cat 4... I want that he hides id_cat 1.
How I can make this?
OBS: Sorry my english! :)
Thanks
It takes off id the same, using ASC or DESC, is in the same…
I am trying to make a system of that when the user to bring up to date its area, either counter for first, however it is repeating the user. It wanted q showed to only one time each user.
Type favorites of fotolog
Somebody knows the solution?
On a side note, when using a GROUP BY you should also GROUP on the non-aggregate function fields in your query. The syntax used is a MySQL extension to the standard. Yes, it will work in MySQL.
[dev.mysql.com...]