Re: session_registered variable problem
| From: | Jason Wong | Date: | Mon, 28 Jan 2002 16:06:55 +0000 |
| Subject: | Re: session_registered variable problem | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16250@lists.php.net to get a copy of this message | ||
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
*/