i usually use this query to display the last 10 entries from a sql table:
Code: $query = "SELECT search_time, search_keywords FROM phpbb_popsearch ORDER BY search_time DESC limit 35";
as you can see it will order the results by "search_time" so the latest entries are listed first
normally the result would be something like this:
Quotenew entry
duplicate
another entry
bla bla
348237
543543
duplicate
but now i just want to include a "GROUP BY" in this sql request
Code: $query = "SELECT search_time, search_keywords FROM phpbb_popsearch ORDER BY search_time DESC limit 35";
but with the GROUP BY my sql query isn't ordered correctly anymore.
the result would be something like this:
QuoteQuotenew entry
another entry
bla bla
348237
543543
duplicate
notice the "duplicate" entry was grouped together, but it's not in the second first position anymore ???
i was expecting a result like this:
Quotenew entry
duplicate
another entry
bla bla
348237
543543
Since entry called "duplicate" is the second last added entry....
i hope you understand what i mean
Expandable Post Code
Hi,Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so its all just plain html and php coding. I have a page that displays short news articles of about 25 30 words
need to add "sizes" to shopping cart
Hey guys, I am trying to figure out a way to add a "size" selector on to this bit of code. I added a way to view it in the "zoom.php" page and also to select a size from the sizes
GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other. I have an index.php page where there is a menu across the top with 5 choices. For example, HOME | MONKEYS | CATS |
Undefined variables
hi----------------------------------------------------------------------------------------------------error log "[Sat Jan 09 17:40:00 2010] [error] [client 127.0.0.1] PHP Notice: Undefined
how to remove in php string display
My code is$message="We're looking at developing our website.";$body= "My message is,\n\n\n\n\t\t\t".$message";echo $body;I get result We\'re looking at developing our
Adding to the next element in a multidimensional array
Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spot in the field_spaces array. Always adding to the next spot. I'll be calling this in a for loop to
Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and then decoded. For security and later readability.
Help with file_get_html
The following code gives the expected results:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.I'd like to be able to move the mouse within that image & display the correct image coordinates to the user.How difficult
how can we add data from dynamic fields to mysql db in php
i have a script which i found on the internet. i modify that script according to my needs. what is in that script is there are three form fields with two buttons. one button is "Give me more