Re: PHP & My SQL

From: Date: Wed, 06 Sep 2000 01:56:58 +0000
Subject: Re: PHP & My SQL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-15418@lists.php.net to get a copy of this message
if you want it only to delete when status='Alert' AND number < 50 in the same row then thats what your doing. if you want it to delete rows were status='Alert', and also rows where number < 50 you want to do an OR not and AND. Comron ----- Original Message ----- From: "Dewa" <dewa@indosat.com> To: "PHP Mailing List" <php-general@lists.php.net> Sent: Tuesday, September 05, 2000 5:55 PM Subject: [PHP] PHP & My SQL Hi ... i have some problem ... maybe any of you could help me with this one. I've made a script that look like this : <?php $link=mysql_connect ("xxxx","xxxx","xxxxx") or die ("Can't Connect to MySQL Server"); mysql_select_db ("xxxx") or die ("Can't Connect to Database"); $load="LOAD DATA INFILE xxxxx.txt' INTO TABLE logbook FIELDS TERMINATED BY '\ '"; $dele="DELETE FROM logbook WHERE status='Alert' AND number < 50"; what i wanna ask is the $dele= .... is working fine when deleting the record with status='Alert' .. but it doesn't deleting number < 50 . what is the correct command for it. cause when i do that directly from MySQL command, it worked.

« previous php.general (#15418) next »