Re: [PHP-DB] fwrite(): can this function append to the middle of a file?

2007-08-15 Thread Chris
joefazee wrote: Can i write to the middle of a file using the fwrite() function like --- line one line two line three and maybe the next day i want to write in between line two and line three. Read in the whole file. Put the line in the middle manually. W

RE: [PHP-DB] fwrite()

2002-01-25 Thread Gurhan Ozen
iel' Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] fwrite() $prefilename = date("m-d-y"); $filename = "$prefilename.txt"; $db = mysql_connect("localhost","cloft","spring"); mysql_select_db("countrylo

Re: [PHP-DB] fwrite()

2002-01-25 Thread daniel
> $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 catal

RE: [PHP-DB] fwrite()

2002-01-25 Thread Jamie Kupernik
p, $fileresults); fclose($fp); $updatereq = mysql_query("UPDATE catalogreq SET PROCESSED = 'Y'"); -Original Message- From: daniel [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 4:15 PM To: James Kupernik Cc: [EMAIL PROTECTED] Subject: Re: [PHP

Re: [PHP-DB] fwrite()

2002-01-25 Thread daniel
> 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL P

Re: [PHP-DB] fwrite()

2002-01-25 Thread James Kupernik
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? > I'm trying to take the contents of a table and write them to a file on my > server. Everything seems to function ok (AKA no errors) but no file get

RE: [PHP-DB] fwrite()

2002-01-25 Thread Gurhan Ozen
You don't have anything to write to the file.. mysql_query() function returns true or false, it doesn't return the actual qurey result you'd see in mysql monitor. You have to use some other functions such as mysql_fetch_array(), mysql_num_rows() to retrieve the data before you can write it into a

Re: [PHP-DB] fwrite()

2002-01-25 Thread daniel
> I'm trying to take the contents of a table and write them to a file on my > server. Everything seems to function ok (AKA no errors) but no file gets > written ... I can't figure out why. Can anyone shine some light on this dark > problem? > > $db = mysql_connect("localhost","cloft","s