Quote:
Originally Posted by comports
Thanks to Flesso I got the other bits sorted but have stubled at this hurdle. I want to delete stuff from the DB using php.
Code:
$sql="DELETE FROM table1 WHERE name=$name AND WHERE tel=$tel";
$result = mysql_query($sql);
This is what I have but it fails to delete..... I know thw values of $name and $tel are being passed in cos I did a print $sql and it looked right..
Any clues.
Thanks
Ash
|
Try something like:
PHP Code:
$query = 'DELETE FROM Table WHERE Name =' . $name;
So...
PHP Code:
$sql = 'DELETE FROM table1 WHERE name = ' . $name . 'AND tel = ' . $tel;
Just a try, as I said previously, I'm no expert....
__________________
Regards,
Josh Hold
eUKhost Blog: Over 1000 Computer Related Articles to Sink Your Teeth Into!
LDN GIGS - Gig Listings for London
Super Moderator
I'm only a forum gremlin (moderator), and do not work for eUKhost in any way. Opinions expressed by me are mine only, and do not reflect those of either eUKhost or any company that may be listed above.
I don't bite, honest.