RE: [PHP-DB] listing question
| From: | Chris Payne | Date: | Tue, 11 Apr 2006 18:55:46 +0000 |
| Subject: | RE: [PHP-DB] listing question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-41692@lists.php.net to get a copy of this message | ||
Hi there,
I tried something similar:
$query = "SELECT * FROM videos WHERE videomakers_website_url = '$x' AND
privatepublic = 'public' AND producer_website LIKE '%$x%' OR
videomakers_website_url LIKE '%$x%' ORDER BY videomakers_site_position ASC,
video_title ASC LIMIT $offset, $item_perpage";
$querytotal = "SELECT count(*) FROM videos WHERE videomakers_website_url =
'$x' AND privatepublic = 'public' AND producer_website LIKE '%$x%' OR
videomakers_website_url LIKE '%$x%' ORDER BY videomakers_site_position ASC,
video_title ASC";
My problem is, it displays not alphabetical videos first and then LAST it
displays the videos with numbers, and when I can get the numbers at the top
of the listing, they are in the wrong order (IE: 0,1,2 is from the bottom up
and not 0 being at the top, 1 being next and so on).
Chris
Is there something stopping you from specifying two columns to order results
by, ie:
select myNumeric , myText
from myTable
order by myNumeric asc, myText asc
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/308 - Release Date: 4/11/2006