|
Posted by ste on 11/19/49 11:46
"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:e33hpl$o64$1@netlx020.civ.utwente.nl...
> The only thing I can think of is that the following code sets
> $_GET['imagetype'], allthough it didn't previsously exist.
>
> if(get_magic_quotes_gpc()){
> $_GET['imagetype'] = stripslashes($_GET['imagetype']);
> }
>
> Try echoing your query, is should be "SELECT * FROM mydatabase" and
> nothing
> more.
> Else try:
>
> $where = (isset($_GET['imagetype'])&&$_GET['imagetype']!='') ? "WHERE
> imagetype = '".$imagetype."'":'';
>
> Grtz,
> --
> Rik Wasmus
Hi Rik,
I replaced the existing $where line with the one above as per your
suggestion, and this now works perfectly! :-)
Old: $where = (isset($_GET['imagetype'])) ? "WHERE imagetype =
'".$imagetype."'": '';
New: $where = (isset($_GET['imagetype'])&&$_GET['imagetype']!='') ? "WHERE
imagetype = '".$imagetype."'":'';
I wouldn't have a clue why one works and one doesn't (well, they both worked
of course, but 1st one returned only blank fields, and the 2nd one returned
all fields which is what I wanted), but I've got a few books to work through
now so I'll revisit this post in a few months (if I'm lucky!) and let you
know! :-)
Thanks for all your help Rik, it's appreciated.
Ste
[Back to original message]
|