On Monday 28 January 2002 23:45, Markus Lervik wrote:
> Well, in this particular case it won't work at all, because the SQL-query
> is dynamically created based on what the user wants to search for. It
> doesn't nessecary include all columns. The only static bit of the query is
> "FROM uusi_lehtitaulu L, nimet N" and "WHERE (L.Nimi_id=N.id" : ) It would
> be just as big a mess with a truckload of concatenations, like
>
> $query = "SELECT " . $tables . " FROM uusi_lehtitaulu L, nimet N WHERE
> (L.nimi_id=N.id" . $search . ") LIMIT $start,20";
I usually give the concatenations a miss if I can and just use:
$query = "SELECT $tables FROM ... ";
> Besides, I have a strange fetisch to do everything the hard way. : )
Masochist :)
Anyway, as per the subject, how are you getting $page? I assume it is stored
in the session. Is $page behaving correctly when you go from one page to the
next? Could you post the relevant code?
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
/*
Distrust all those who love you extremely upon a very slight acquaintance
and without any visible reason.
-- Lord Chesterfield
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]