Help for this page

Select Code to Download


  1. or download this
    #Last record Tested Good
           
    ...
       WHERE lastname >='z%' AND lastname >= 'a%'
       ORDER BY user_id DESC LIMIT 1 ) sub
       ORDER BY lastname ASC #Works fine hard coded
    
  2. or download this
       SELECT * FROM ( 
       SELECT * FROM users 
       WHERE lastname <='z%' AND lastname >= 'a%'
       ORDER BY user_id DESC LIMIT 1 ) sub
       ORDER BY lastname ASC
    
  3. or download this
    SELECT * FROM users 
    ORDER BY lastname DESC
    LIMIT 1