Doc Thirst
05-17-2006, 01:37 PM
I'm doing a sql statment like this:
select * from students where active = '$active' order by lname
Now $active can be 1 or 0 or anything depending on other code (think past, present, all).
so my question is...what is the wild card character to get everything from the table.
thus far I tried:
select * from students where active = '*' order by lname
and
select * from students where active = '%' order by lname
Thanks to anyone with a few seconds to look this over. I tried searching, but I'm a bit lost on the terminology.
select * from students where active = '$active' order by lname
Now $active can be 1 or 0 or anything depending on other code (think past, present, all).
so my question is...what is the wild card character to get everything from the table.
thus far I tried:
select * from students where active = '*' order by lname
and
select * from students where active = '%' order by lname
Thanks to anyone with a few seconds to look this over. I tried searching, but I'm a bit lost on the terminology.