Stupid PHP :p
Dec. 15th, 2003 10:58 pmSo, one of my clients wants a script that will dump the contents of his customer database into a comma-delineated text file, so he can import it into Excel and use that to manage his postal mailings.
Thing is, I've been mucking around with fopen/fwrite/etc. in PHP since yesterday, and I can't even get it to open the text file! I'm using the full path of the file, and I think the permissions on the text file are correct, so I'm not sure where to go from here. Any ideas on what the issue might be? PAPA TASUKETE ;_;
Of course, if I were smart, I'd just scrap this junk and do it as a CGI script in Perl, but connecting to an SQL database in Perl seems equally hairy. Argh!
---------
In other news, all the grades for my Most Important Classes (i.e. the ones I needed for graduation) have come in. In spite of any subconscious attempts at self-sabotage that may have occurred over the past couple of weeks, my grades are fine, and I am done! Wheeee! I still don't have a nihongo grade, but eh, whatever, I took it pass/no pass.
Thing is, I've been mucking around with fopen/fwrite/etc. in PHP since yesterday, and I can't even get it to open the text file! I'm using the full path of the file, and I think the permissions on the text file are correct, so I'm not sure where to go from here. Any ideas on what the issue might be? PAPA TASUKETE ;_;
Of course, if I were smart, I'd just scrap this junk and do it as a CGI script in Perl, but connecting to an SQL database in Perl seems equally hairy. Argh!
---------
In other news, all the grades for my Most Important Classes (i.e. the ones I needed for graduation) have come in. In spite of any subconscious attempts at self-sabotage that may have occurred over the past couple of weeks, my grades are fine, and I am done! Wheeee! I still don't have a nihongo grade, but eh, whatever, I took it pass/no pass.
I am guessing mySQL?
Date: 2003-12-15 11:09 pm (UTC)This is thedanceman btw.. just to lazy to login
Re: I am guessing mySQL?
Date: 2003-12-15 11:13 pm (UTC)Re: I am guessing mySQL?
Date: 2003-12-15 11:24 pm (UTC)In that case either use the code on this program or upload the php directly..It should be easy..and you should be able to install it. Then anytime they want, they can login and download a new file.
I am linking you to the demo, click export.
This tool rocks and I use to use it on sites.
no subject
Date: 2003-12-15 11:09 pm (UTC)no subject
Date: 2003-12-15 11:15 pm (UTC)no subject
Date: 2003-12-15 11:27 pm (UTC)I'm sad, and yet, proud. ;_;
no subject
Date: 2003-12-16 12:05 am (UTC)no subject
Date: 2003-12-16 12:26 am (UTC)Man, there were a few times where it totally was in doubt! Or maybe it's just me. ^^;
But still, thaaaaank you!! :D
no subject
Date: 2003-12-16 01:55 am (UTC)I am sorry but all this computer jargon make less sense to me than a Sanskrit script...BTW, I don't know any Sanskrit..
no subject
Date: 2003-12-16 03:07 am (UTC)That's a terrible script and I make no guarantees that it even works at all as I haven't tested it, but it does show how to connect to the db with perl.
Hmm, actually, this would probably be better (and is probably about what you're trying to do with php now), since it doesn't run the risk of eating all the server's memory if the dataset gets large, just disk space.
You could probably pull the first technique with straight php too. I don't know php worth a damn, so I can't give you code for that, but just set the content-type and dump the data straight out and let php handle it all, don't write it to a file at all.
no subject
Date: 2003-12-16 08:23 am (UTC)no subject
Date: 2003-12-16 08:24 am (UTC)