Activity Stream
48,167 MEMBERS
6714 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 8 of 8
  1.     
    #1
    Banned
    Website's:
    WarezRelease.org ThatHosting.co

    Default Sql 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.""); 
    how to do this?
    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

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    vaporhostn.com
    well 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

  4.     
    #3
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    doh 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?

  5.     
    #4
    Member
    Website's:
    vaporhostn.com
    well best thing i can think of is just start the auto increment at the last number of how many records you got and slowly add the numbers on your own unless you can figure a way to edit the existing tables and place a id...

  6.     
    #5
    Respected 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.

  7.     
    #6
    Banned
    Website's:
    WarezRelease.org ThatHosting.co
    hi 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)

  8.     
    #7
    Respected 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.

  9.     
    #8
    Member
    sql have command to deal whit data(date)
    can be orded by date correctly check
    convert(date, date, 105)


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [WCDDL] Sql Order
    By Chris2k in forum Web Application/Script Support
    Replies: 1
    Last Post: 24th Jan 2012, 06:26 PM
  2. Ascending Order
    By DemonMan in forum Webmaster Discussion
    Replies: 0
    Last Post: 26th Dec 2011, 08:59 PM
  3. [Shared] GET 99% OFF From Your Order !!!
    By sady92 in forum Archive
    Replies: 1
    Last Post: 11th Jun 2011, 03:28 PM
  4. [Selling] Order forum
    By DeathNote in forum Completed Transactions
    Replies: 9
    Last Post: 8th Nov 2010, 05:36 PM
BE SOCIAL