Question:
PHP SQL functions without a SQL database?
James
2009-06-27 08:37:12 UTC
I'm trying to develop a PHP-SQL site but adding SQL functionality to our site will cost us an extra $1000/year! We only need it for a minor calendar and profile function so I don't think I can convince the boss that it's worth it.

Is there a way to have a database on a website without using SQL? Maybe by accessing a set of CSV files?
Three answers:
Aerivium
2009-06-27 08:44:15 UTC
why the hell would sql cost $1000 a year? mysql is free...



but yes if you want to you can manipulate files(csvs or whatever format you want) as if they were database in php using these functions: http://uk3.php.net/manual/en/ref.filesystem.php



Effectively this is the same as having a database only with mysql, or another database implementation, a lot of the manipulating files and organising the data,etc is done for you.



Edit: Here is a possible solution: http://www.freemysql.net/v2/ i cant vouch for it though as i have never used it.
?
2016-05-25 16:06:25 UTC
The first two responses couldn't be more wrong. You do *not* need to know SQL or connect to a database to use PHP. PHP allows you to create dynamic websites in which you (the webmaster) can control content and user input better than you can with plain vanilla HTML. Here are some things you can do in PHP without needed to know SQL: 1) Create include files and templates 2) Have a user submit a form and you can then choose to do anything you want with the data 3) Use the GD extension to create graphics 4) Create graphs and pie charts 5) Do mathematical calculations 6) Inclue if & case statements to your html 7) Create better error handling 8) Much much more 9) and yes even connect to a database using SQL Good luck :-)
John Stalvern
2009-06-27 08:59:09 UTC
A database is more than just a collection of data. A proper DBMS (e.g., MySQL) offers things like redundancy and fault-tolerance. If you are trying to use CSV to replace a DBMS, you are setting yourself up for problems down the road.



If your host charges you $1000/year for a simple SQL database, get a different host. You are being scammed.



OK, since you can't get a different host, you can still get a SQL server on the cheap. You can get a cheap MySQL/Postresql host for a few bucks a month. I don't know of any offhand, but it won't be terribly hard to find in a search. You can then use that server instead of whatever one costs $1000/year. If you need any help configuring that, it probably won't be hard to find some student at the institution to help you.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...