FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Sqlite?





rvbarreto
I've made an MySql database, and I want to acess it trouht PDO, so... when I used MySql, I made this code:

try{
$con = new PDO(mysql:host=localhost;dbname=rvbarret_ergosum, $user, $pass);
}catch (PDOException $e){
echo $e->getMessage();
}

If I want to use like

new PDO(sqlite:....);
what i should use after sqlite so this work likes mysql, once that mysql pdo looks like doesn't work in frihost?
djclue917
SQLite doesn't use the user, password, host, and port settings. Also, the dbname should correspond to the path to the SQLite database file.
rvbarreto
Humm... ok understod.

That means that I can generate a file at phpmyadmin (export it) from my MySQL database, like database.sql, and sqlite will read it?

Or sould I use xml?
Diablosblizz
Yes it will be recognized. If you need any help with what SQLite will understand then refer to this:

http://www.sqlite.org/lang.html

Kind Regards.
Fire Boar
Well, it might choke if your schema has the ENGINE=MyISAM or something at the bottom, so be careful about that. Use one of the compatability modes and it should work just fine.
rvbarreto
it works!
Very Happy Very Happy Very Happy Very Happy

I never thought this day will come!

Crying or Very sad
Related topics
XAMPP - All-in-One WebServer package
PHP without mySQL
php without server
PHP version 5.0
New CMS - ToendaCMS - No database necessary!
.htaccess problem
SQLite
Typo installation
need help enabling GD php extension
how do i set up a free host?
sqlite help
SQLAlchemy vs vanilla sqlite
MySQL to SQLite?
Python and SQLite
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.