Results 1 to 8 of 8
-
23rd Dec 2011, 09:43 PM #1OPBannedWebsite's:
WarezRelease.org ThatHosting.coSql Order
hi
um, ok heres an SS:
they're ordered by date, which is fine but theirs 40 sites per page, so the above is an SS from page 1. sites are blacklisted daily so i need the most recent records on the 1st page...
heres what i havve atm:
PHP Code:$query = mysql_query("SELECT * FROM wcddl_blacklist ORDER BY ".$core->sqlOrder." dat DESC LIMIT ".$start.", ".$pageLimit."");
Chris2k Reviewed by Chris2k on . Sql Order hi um, ok heres an SS: http://i.lulzimg.com/591e92dd0f.png they're ordered by date, which is fine but theirs 40 sites per page, so the above is an SS from page 1. sites are blacklisted daily so i need the most recent records on the 1st page... heres what i havve atm: Rating: 5
-
23rd Dec 2011, 09:55 PM #2MemberWebsite's:
vaporhostn.comwell you wont be able to unless you have a better way to get the exact end...
So the table all your urls are being entered into insert a new table that auto increments...
so it goes 1,2,3,4,5...
From which you would do the order by (your increment number table) DESC
-
23rd Dec 2011, 10:12 PM #3OPBannedWebsite's:
WarezRelease.org ThatHosting.codoh y didnt i think of tht?
so ill make a field called id, then how to give my current sites an id?
+ will the id start from 8 mnths ago, first ever site gets id #1 or it starts now?
-
23rd Dec 2011, 10:22 PM #4MemberWebsite's:
vaporhostn.com
-
23rd Dec 2011, 10:28 PM #5Respected Member
Yes it should take te first inserted to the last unless you have it using and index.
So when you use phpmyadmin to alter the table or however you do it it should take first to last inserted when the field is added.
-
26th Dec 2011, 03:24 PM #6OPBannedWebsite's:
WarezRelease.org ThatHosting.cohi is thr any other way besides adding 'id' field - auto-increment? as i hagve to delete an index coz auto has 2 be an index thn i get dupes...
My date is a INT (11)
-
26th Dec 2011, 04:37 PM #7Respected Member
Auto can be a primary key and it should never duplicate. But you shouldn't need an id if date is the date the site is added to the database.
But you have to have more in that record than what you are showing us.
It seems the order you are doing should work. If you do not want banned sites in the list then you have to add another where saying do not include banned.
But date reverse order should give you the last ones entered in database first.
-
2nd Jan 2012, 11:35 AM #8Member
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[WCDDL] Sql Order
By Chris2k in forum Web Application/Script SupportReplies: 1Last Post: 24th Jan 2012, 06:26 PM -
Ascending Order
By DemonMan in forum Webmaster DiscussionReplies: 0Last Post: 26th Dec 2011, 08:59 PM -
[Shared] GET 99% OFF From Your Order !!!
By sady92 in forum ArchiveReplies: 1Last Post: 11th Jun 2011, 03:28 PM -
[Selling] Order forum
By DeathNote in forum Completed TransactionsReplies: 9Last Post: 8th Nov 2010, 05:36 PM
themaPoster - post to forums and...
Version 5.23 released. Open older version (or...