Problem with SQL Statement/Sort Function

Posted: 02-24-2005, 04:41 PM
Hey everyone, I am inserting a drop down menu that will allow a user to sort
the database result on my page. The problem is, i'm not sure where to add the
sort command in my SQL query. Below is a sample of my query, if anyone knows
what and where I should insert this statement I would be most greatful! SQL
query: mysql_select_db($database_localconn, $localconn); $query_clockset =
'SELECT sku, manufacturer, item, smallpic, price FROM clocks ORDER BY smallpic
DESC'; $query_limit_clockset = sprintf('%s LIMIT %d, %d', $query_clockset,
$startRow_clockset, $maxRows_clockset); $clockset =
mysql_query($query_limit_clockset, $localconn) or die(mysql_error());
$row_clockset = mysql_fetch_assoc($clockset); Here are the links in my drop
down menu: '?sort=price'>Price '?sort=manufacturer'>Manufacturer
'?sort=item'>Item Name '?sort=sku'>SKU

Reply With Quote

Responses to "Problem with SQL Statement/Sort Function"

 
LinkBack Thread Tools Search this Thread Display Modes
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML sort tagyro Macromedia Flash Data Integration 0 03-17-2005 03:36 PM
Sort by id Chanond Dreamweaver AppDev 1 02-23-2005 10:14 PM
Sort the table per date or per fields name MeTin Dreamweaver AppDev 4 02-22-2005 07:29 AM
To sort the table per fields MeTin Dreamweaver AppDev 1 02-20-2005 04:54 PM
Cannot sort DataGrid using DefaultView? Bill Todd ASP.NET Data Grid Control 0 07-29-2003 09:56 PM