is this sql correct?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phil speakman
Forum Newbie
Posts: 12
Joined: Wed Oct 22, 2003 9:25 am
Location: Liverpool

is this sql correct?

Post by phil speakman »

i'm using this to do a searchable mySql database

Code: Select all

$query = "select * from alt_bridge_pupils where pupil like '$name'";
and it doesn't output anything - i know name holds a value that is in database, any thoughts
Phil
User avatar
devork
Forum Contributor
Posts: 213
Joined: Fri Aug 08, 2003 6:44 am
Location: p(h) developer's network

Post by devork »

try this

Code: Select all

$query = "select * from alt_bridge_pupils where pupil like '%$name%' ";
phil speakman
Forum Newbie
Posts: 12
Joined: Wed Oct 22, 2003 9:25 am
Location: Liverpool

cheers

Post by phil speakman »

who ever you are i want you babies....
User avatar
devork
Forum Contributor
Posts: 213
Joined: Fri Aug 08, 2003 6:44 am
Location: p(h) developer's network

Re: cheers

Post by devork »

phil speakman wrote:who ever you are i want you babies....
was that related to query :roll:
Post Reply