RE: [PHP] SQL in XML [was PHP and DBase...]
But, finally, I wonder if I shouldn't use XML files instead ? Is it possible, directly, to make a SQL request on a XML file ? How much data are you storing and how fast do you need it? If you're doing heavy database type queries, then just use mySQL. Yes, I use Oracle for my real data ;-) XML is kind of a PITA to use IMHO. You have to set up DOM Objects and all this crap, then loop over nodes and use xpaths and watch out for #text elements and it's just messy. I'm forced to use XML for part of a project @ work, and I'm always grateful when I can switch back to using a database and SQL as God intended it to be. ;-p Hum, ok. XPaths is the only good solution to query an XML file (I am a newbie in this domain) ? However, if you're just storing some basic configs or preferences, then I would suggest looking into a much simpler (and universal): http://www.php.net/parse_ini_file Yes !!! Excellent !!! It is exactly what I need. I'd like to play with XML files, but, for my problem, your solution is perfect ! Thank you very much. David. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL in XML [was PHP and DBase...]
At 03:08 PM 1/31/2006, David BERCOT wrote: Hi, I'd like to connect to DBase files (.dbf) in order to do SQL requests. Do you know if it is possible ? If yes, do you have an example ? I'm working on Debian with PHP5. Thank you very much. David. Blind? http://de.php.net/dbase OK. I should have made such a search ;-) So, it is possible... I'll try... But, finally, I wonder if I shouldn't use XML files instead ? Is it possible, directly, to make a SQL request on a XML file ? In fact, I was looking for a file format which would be modifing on Windows and on Linux. So, I thought about dbf. But now... Thank you very much. David. David, If I remember correctly, there are a lot of caveats surrounding .dbf files. If it is data you have to manage, why not use MySQL / PostgresSQl / Firebird? Cheers - Miles -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.375 / Virus Database: 267.14.25/246 - Release Date: 1/30/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL in XML [was PHP and DBase...]
Hi, I'd like to connect to DBase files (.dbf) in order to do SQL requests. Do you know if it is possible ? If yes, do you have an example ? I'm working on Debian with PHP5. Thank you very much. David. Blind? http://de.php.net/dbase OK. I should have made such a search ;-) So, it is possible... I'll try... But, finally, I wonder if I shouldn't use XML files instead ? Is it possible, directly, to make a SQL request on a XML file ? In fact, I was looking for a file format which would be modifing on Windows and on Linux. So, I thought about dbf. But now... Thank you very much. David. David, If I remember correctly, there are a lot of caveats surrounding .dbf files. If it is data you have to manage, why not use MySQL / PostgresSQl / Firebird? In fact, it is only for one table. And I'd like a simple thing. For my data, I use Oracle !!! David. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SQL in XML [was PHP and DBase...]
But, finally, I wonder if I shouldn't use XML files instead ? Is it possible, directly, to make a SQL request on a XML file ? How much data are you storing and how fast do you need it? If you're doing heavy database type queries, then just use mySQL. XML is kind of a PITA to use IMHO. You have to set up DOM Objects and all this crap, then loop over nodes and use xpaths and watch out for #text elements and it's just messy. I'm forced to use XML for part of a project @ work, and I'm always grateful when I can switch back to using a database and SQL as God intended it to be. ;-p However, if you're just storing some basic configs or preferences, then I would suggest looking into a much simpler (and universal): http://www.php.net/parse_ini_file -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL in XML [was PHP and DBase...]
On Tue, January 31, 2006 1:08 pm, David BERCOT wrote: Hi, I'd like to connect to DBase files (.dbf) in order to do SQL requests. Do you know if it is possible ? If yes, do you have an example ? I'm working on Debian with PHP5. Thank you very much. David. Blind? http://de.php.net/dbase OK. I should have made such a search ;-) So, it is possible... I'll try... But, finally, I wonder if I shouldn't use XML files instead ? Is it possible, directly, to make a SQL request on a XML file ? In fact, I was looking for a file format which would be modifing on Windows and on Linux. So, I thought about dbf. But now... MySQL and PostgreSQL both work on Windows (and Linux, duh). If you're starting a NEW database project, DBase is the LAST thing I'd choose, unless there's some over-riding concern you've not yet mentioned. Actually, DBase doesn't even seem to use SQL, so I suppose your question could have been: Is there any way to tie standard SQL into DBase, instead of using the normal PHP DBase extension?... I'm pretty sure both PostgreSQL and MySQL allow you to input/output data as XML. For sure, MySQL has a new Engine type where you can act upon a CSV file using SQL which is the closest match to what you seem to be aiming towards... Though I still suspect your aim is bad, tell you the truth... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL in XML [was PHP and DBase...]
On Tue, January 31, 2006 1:49 pm, David BERCOT wrote: After reading more and more of this thread, I think you should also consider this option: http://www.php.net/sqllite It lets you use SQL, and it stores the data in a local file, and it's quite lightweight/cheap/easy. Personally, though, I'd just toss the table in Oracle and use the tools you already have, rather than maintain yet another paradigm within the application... YMMV -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php