im trying to do the most basic of basics and i fucking cant do it:
select * from table where name = '$name'
Now everything works fine as long as $name contains a value.
But when the var $name is empty i want to grab ALL records
but mysql says fuckyou and doesnt select a thing. Duh.
Is there some sort of wildcard i can give to $name to select
all records? I tried the obvious. * % %% _ ...
Yes, i know "select * from table" does the trick but i want to use
this syntax ;)
Anyone? :help:
select * from table where name = '$name'
Now everything works fine as long as $name contains a value.
But when the var $name is empty i want to grab ALL records
but mysql says fuckyou and doesnt select a thing. Duh.
Is there some sort of wildcard i can give to $name to select
all records? I tried the obvious. * % %% _ ...
Yes, i know "select * from table" does the trick but i want to use
this syntax ;)
Anyone? :help:

Comment