ArnisR Posted November 4, 2010 Report Share Posted November 4, 2010 Kā no mysql datubāzes izvadīt visus ierakstus, izņemot pašu pirmo? Izvadei jāsakārtojas pēc ORDER BY id DESC, tātad tas pirmais ir tas jaunākais. Quote Link to comment Share on other sites More sharing options...
Rincewind Posted November 4, 2010 Report Share Posted November 4, 2010 Var šitā: SELECT * FROM tabula ORDER BY id DESC LIMIT 1,1000000 1000000 vietā jebkāds priekš tava query nereāli liels skaitlis. Quote Link to comment Share on other sites More sharing options...
sheps Posted November 4, 2010 Report Share Posted November 4, 2010 (edited) Var šitā: SELECT * FROM tabula ORDER BY id DESC LIMIT 1,1000000 1000000 vietā jebkāds priekš tava query nereāli liels skaitlis. vismaz cilvēkam varēji pateikt kas ir kas :) $from = 1;//No kura ieraksta sākt (0 būs pirmais ieraksts) $limit = 1;//Cik ierakstus attēlot SELECT * FROM tabula ORDER BY id DESC LIMIT $from,$limit Edited November 4, 2010 by sheps Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 4, 2010 Report Share Posted November 4, 2010 vismaz cilvēkam varēji pateikt kas ir kas :) Nu galvenais ir dot atslēgas vārdu, tad jau talkā nāk māte Google! =P Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.