Use MySQL database like SQLite in PHP - php

Im developing a little web application with PHP and MySQL but in the computer that im working, i cannot install Database Servers like SQL Server or MySQL Server.
I've worked with SQLITE and its amazing, NO INSTALL just the DABATASE AND THE CORRECT LIBRARIES.
DO you know if there's a way to work like this with MySQL Databases ?
Thanks.
NOTE: I 've tried .sdf of Microsoft SQL COmpact but i dont wanna use Microsoft products for now.

Not possible. MySQL is not a file based Database.

Yeah, you have to install MySQL (if you want MySQL) like you install Php in your computer.
Or you can get both of them in one app like: http://sourceforge.net/projects/xampp/
Is these what you want?

Related

Mysql apache2 phpmyadmin on ubuntu

Im working on a school project, im trying to work with apache2, mysql, php, phpmyadmin, on ubuntu 15.04 separately (im NOT using all in one server like wamp or xamp)
Im familiar with working with apache and php, and i need to make a website that uses a sql database, I don't know how to export my project (where I can find my SGBD files?!) and I don't have a clear idea on how to work with phpmyadmin.
I need some tutorials or books that can get me starting with all these technologies.
The database is exported into .sql files from the phpMyAdmin, or a command line utility mysqldump.
phpMyAdmin Tutorial: http://code.tutsplus.com/tutorials/installing-and-using-phpmyadmin-for-web-development--cms-21947
And for MySQL try to search YouTube for tutorials. I especially love the tutorials made by Derek Banas, this is his take on MySQL: https://www.youtube.com/watch?v=yPu6qV5byu4
I hope this helps you become a better developer!

Run MySQL and SQL database with PHP on windows

I already use wamp(PHP+MySQL) on windows m//c. Now I wan to use SQL database with PHP along with WAMP. Can I use two diff database with PHP on same machine ?
Of course you can, install SQL server database, and change the connection parameter as needed.
You can even use two databases for one project.
Cheers!

Does php 5.6.6 work with mysql 5.6.23?

Or is php 5.4 only compatible with mysql? I've been having some problems getting my php to work with mysql.
I'm using PHP 5.6.6, Apache 2.4, MySQL 5.6.23. My PHP and Apache work just fine. I created a website using CSV. I wanted to learn how to use MySQL, but I was having problems trying to get MySQL to work with my PHP. Now, I have never take any courses on MySQL nor have I ever used. The only thing I have done with MySQL is install it from the community tab from the MYSQL download page. I followed all the instruction and set my file path to be C:\mysql, and my data path to be C:\mysqldata, but I don't know, why it doesn't seem to work with my php when I try to connect. Is there another step I have to take to connect? I know a lot of people use WAMP, which is something I might look into if I don't get this working, but If there's anyone who has installed all three (apache php and mysql) sperately, know what my problem might be, I'll really appreciate it.
PDO works on all PHP versions 5.1+, which is the preferred method to connect to MySQL.

Can use "Multiple MySQL Queries with PHP" with MySQL version 4

I can run multi-queries with MYSQL v5 with extension PHP :mysqli.
But with MYSQL 4 with extension PHP: mysql ..
with new query, have the problem.
I would like to verify the information and the way to resolve.
Because, the company hosting service is using mySQL v4.
Thank you
I would like to verify the information
Yes, you can't
and the way to resolve.
run your queries one by one.

How to migrate from my WAMP environment to using MSSQL?

I have on my local PC installed WAMP environment (using WampServer OS).
Now I would need to change one script from working with MySQL to MSSQL.
I have no idea at all how to proceed, where to download MSSQL, how to install it and how to connect with PHP?
Thank you very much
Download mssql express http://www.microsoft.com/Sqlserver/2005/en/us/express.aspx
Familiarize yourself with one of the great database abstraction layers, for example PDO http://www.php.net/pdo
Refactor your code to use the database abstraction layer
You may need to rewrite the mysql specific things to "standard" SQL
Start by getting Sql Server working. If you are using an old copy of Sql Server (pre 2005) you will need to make sure ntwdblib.dll is present in your System32 directory, and removed from your PHP dll directory (ntwdblib.dll is installed with the enterprise tools, so you may have to install them on your PHP box as well). Once you have Mssql querying properly, start finding where Mssql differs from MySql in your code.
A couple of tips:
The ntwdblib doesn't accept long strings (I think it is limited to 4k, but don't quote me on that). You have to use Stored Procs if you are trying to process a string longer than 4k.
Try to use Sql Server 2005 if you can (see above), the ntwdblib.dll is ancient and has numerous issues.
The PHP site is your friend for mssql.

Categories