Hello.

I want to create a database on my pc localhost and then want to use PDO to connect with that database to creating table and so on...

What should i do?

Re: need help for database and PDO 80 80

Do you have the database installed? What DB are you using? MySQL?
If you are new to PHP and MySQL maybe you should use Xampp.

Re: need help for database and PDO 80 80

I wanted to create db with sqlite3 which i always use. Can i connect to it with PDO?!

Re: need help for database and PDO 80 80

@AleMonteiro, as we see in the Requirements part of that page you gaved the link, PDO Driver for SQLite 3.x is needed.
Well, can you tell me how can i install that Driver please?! I don't know waht to do. I'm using Linux Ubuntu.

Re: need help for database and PDO 80 80

Niloo, we're here to help solve problems and give ideas. Not to google for you.
http://stackoverflow.com/questions/948899/how-to-enable-sqlite3-for-php

I don't even use Linux and I knew it was going to be something with sudo app-get.

Re: need help for database and PDO 80 80

@AleMonteiro, i didn't ask you google for me.
I know how to install sqlite3 for php but the problem was thatwhen i want to connect it with PDO i still get the error "can't find Driver".

When i have a problem, i always search for it on the net first, then if i couldn't find my answer, i will ask for help here in DANIWEB, maybe users know the answer. I just asked if you know how i can install the driver on my os, but didn't ask you to google it for me.

Anyway, thank you for all answers.

Re: need help for database and PDO 80 80

Sorry Niloo, my bad. I tought you wanted to know how to install the SQLLite.
About the driver, I never used, but maybe those links can help you:
http://www.pannix.net/713/ubuntu-php-pdo-and-sqlite-a-first-hurdle/
http://archive.gregk.me/2011/installing-pdo-sqlite3-support-on-ubuntu/
http://serverfault.com/questions/32982/how-do-i-enable-sqlite-on-linux-apache-php

Re: need help for database and PDO 80 80

That's ok @AleMonteiro.
I didn't find the answer on those 3 links unfortunatelly. So i have to use a host instead of on my localhost. Thank you anyway.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.