Re[3]: Simple query? Is it possible? (hm.. solution?, maybe can be better?)

2005-05-09 Thread Vaidas Zilionis
needed VZ> loading data from server. VZ> But now i need to to simple trick, SelectRowWhereId(1525) VZ> script must now position of that row in database with same WHERE and VZ> ORDER. VZ> so i never know "page" number. VZ> :) RB>> Vaidas Zilionis wrote: RB>>

Re[2]: Simple query? Is it possible?

2005-05-09 Thread Vaidas Zilionis
n database with same WHERE and ORDER. so i never know "page" number. :) RB> Vaidas Zilionis wrote: RB> [...] >> Example items are displayed 100 in page, and i display 20 pages >> numbers >> 1 ... 4[5] 6 x >> doomain.con/items.php?page=5 >> >>

Simple query? Is it possible?

2005-05-09 Thread Vaidas Zilionis
Hi all, let's figure we have one big database table ~1mln rows. I can easly to collect needed data from this table with query: SELECT id,title,cdate FROM bigtable WHERE active ORDER BY cdate ASC, id ASC LIMIT 300,100 So i get needed rows to display. i can make easly with page numbers to display

Counting from diffrent tables, problem

2003-09-30 Thread Vaidas Zilionis aka Why2liz
elect r.id, count(s.id) as sk from rajonai as r, sodybos as s WHERE s.rajonai_id = r.id group by r.id It's work good, but I can't get rows which count(s.id) = 0 Example with 1 query I get 1|12 2|0 3|15 4|5 5|1 With second only 1|12 3|15 4|5 5|1 How to get and 2 row? Which count res