RE: [PHP-DB] fwrite()

From: Date: Fri, 25 Jan 2002 21:43:54 +0000
Subject: RE: [PHP-DB] fwrite()
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-16194@lists.php.net to get a copy of this message
Jamie, The main problem here is , you are selecting the rows that are some null values. mysql_fetch* doesn't return any null columns. Yes, you read it right, if you have a table with say, 5 columns and if 3 columns in a row are null then you'll only have 2 columns that are not null . Make sure that this is not causing any problem for you. What does your table look like and and what values do your columns have when processed is null anyway? Gurhan -----Original Message----- From: Jamie Kupernik [mailto:Kupernik@bcn.net] Sent: Friday, January 25, 2002 4:22 PM To: 'daniel' Cc: php-db@lists.php.net Subject: RE: [PHP-DB] fwrite() $prefilename = date("m-d-y"); $filename = "$prefilename.txt"; $db = mysql_connect("localhost","cloft","spring"); mysql_select_db("countryloft"); // get requests from table $result = mysql_query("SELECT * FROM catalogreq WHERE PROCESSED IS NULL"); $row = mysql_fetch_array($result); $fileresults = "$row[0],$row[1]\n"; $fp = fopen("$DOCUMENT_ROOT/catalogreq/$filename","w"); fwrite($fp, $fileresults); fclose($fp); $updatereq = mysql_query("UPDATE catalogreq SET PROCESSED = 'Y'"); -----Original Message----- From: daniel [mailto:daniel@inkshop.org] Sent: Friday, January 25, 2002 4:15 PM To: James Kupernik Cc: php-db@lists.php.net Subject: Re: [PHP-DB] fwrite() > Still when I make the changes suggested the file will not be created, > yet I get no form of an error message. > > Is there something else I'm missing? Please post your new code for review. Daniel J. Lashua ************************************************ This message has been scanned for computer viruses and none were found. Country Curtains Information Systems Department ************************************************ ************************************************ This message has been scanned for computer viruses and none were found. Country Curtains Information Systems Department ************************************************ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#16194) next »