![]() |
|
#1
|
|||
|
|||
Pagination & DB search engine queriesI am trying pagination for a database-database search engine - this was the query
$sql = "select id, name from student_adv WHERE name LIKE '%$search%' order by id limit $startIndex, $perPage"; and it worked fine when i had $search = John The problem starts when i put $search = John Lennon I modify my query to $sql = "select id, name from student_adv WHERE name LIKE '%$search%' or name like '%$w1%' or name like '%$w2%' limit $startIndex, $perPage"; here $search = John Lennon $w1= John $w2=Lennon But, the result shows the presence in an order which is random, i.e. Lennon is in the result-set array before John Lennon or John, But, I want the result set array to have John Lennon coming before John & John before Lennon.. So John Lennon Results come first then John and the Lennon How do I do this?? |
Recent GIDBlog
Toyota - 2008 August Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Seo Tips And Tools | dhsn98 | Search Engine Optimization Forum | 5 | 08-Apr-2008 19:12 |
| Using meta tags help in ranking on some search engine | pcx | Search Engine Optimization Forum | 8 | 29-Mar-2005 15:42 |
| How a search engine really works (In english) | jrobbio | Open Discussion Forum | 0 | 06-Jul-2003 17:13 |
| Search Engine Positioning 101 and 201 "How To" Tips... | 000 | Search Engine Optimization Forum | 0 | 29-May-2003 10:34 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The