?gkj
07-07-2003, 09:30 PM
The problem I am having is that I want a system where if I type in my client's name, it will find them in my database. My code is:
$result = mysql_query("SELECT * FROM clients WHERE Name = $name",$db);
which is fine, the trouble comes into play when I put a space in the "Name" field in my database. (ex I want "Joe Smith" instead of "JoeSmith")
So when I put a space in the name, the code won't read the database entry, but if I leave no spaces it works fine.
Can anyone help me? Thank in advance.
$result = mysql_query("SELECT * FROM clients WHERE Name = $name",$db);
which is fine, the trouble comes into play when I put a space in the "Name" field in my database. (ex I want "Joe Smith" instead of "JoeSmith")
So when I put a space in the name, the code won't read the database entry, but if I leave no spaces it works fine.
Can anyone help me? Thank in advance.