Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson
* and then John Holmes declared > >Should the db go like this? > > > >db_urls > >url_id | user_id | project_id | url > > > >db_user > >user_id | name | whatever > > > >db_project > >project_id | user_id > > > >Wow, now i've written it down it seems clearer ;) you guys reckon that's > >the righ

Re: [PHP] Help with fwrite()

2004-09-15 Thread John Holmes
From: "Nick Wilson" <[EMAIL PROTECTED]> Each user (must have an id,name clearly) can fetch as many urls as they wish, those urls get written to the db, then as each url is fetched from the db it is dealt with with php and deleted from the db. What if a user gets cut off from the script and a whole

Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson
* and then John Nichel declared > John Holmes wrote: > >You can't just remove part of a file like you remove part of a string. > >You'll need to read (eventually) the entire file and only write back > >what you want to keep. > > > >Now, you said this could be a very large file, so you don't

Re: [PHP] Help with fwrite()

2004-09-15 Thread John Nichel
John Holmes wrote: From: "Nick Wilson" <[EMAIL PROTECTED]> Im trying to delete a line from a file after having first read the line. The file contains a list or urls, one per new line: like this: [snip] fwrite($f, '', strlen($url2use)); // Where is the "gotha"? Hmmm... how can you write an empty s

Re: [PHP] Help with fwrite()

2004-09-15 Thread John Holmes
From: "Nick Wilson" <[EMAIL PROTECTED]> Im trying to delete a line from a file after having first read the line. The file contains a list or urls, one per new line: like this: [snip] fwrite($f, '', strlen($url2use)); // Where is the "gotha"? Hmmm... how can you write an empty string with a length?

Re: [PHP] Help with fwrite()

2004-09-15 Thread Nick Wilson
* and then Nick Wilson declared > Hi all, > > Im trying to delete a line from a file after having first read the line. > The file contains a list or urls, one per new line: like this: BTW, reading the file into an array, shifting off the first element and rewriting isnt a good option for