Which Is Better In PHP: PDO Or MySQLi?

I am not sure if this is a matter of one’s preference but I believe from my experience PDO provides more coding flexibility that MySQLi.

Here is an example so you will better understand what I mean.

Now, if that were to be MySQLi, I would be doing it like this:

Notice the difference? I had to call if conditions twice. If my query is very long, then my code would also be long.

Plus, there is also the issue of mysqli_escape_string(). With PDO, you do not have to call one since it calls that function automatically when you bind values to the parameters.

When I started using prepared statements in MySQL because of the SQL injection issue, this is the main reason why I opted to use PDO rather than MySQLi.

Found this useful? Donations appreciated to help keep this blog alive.

Xeround Cloud Database

One advantage I believe with anything related to cloud computing is that many issues regarding security are handled by the provider. The subscriber does not have to worry about these things because the provider itself is tasked to ensure that all data of its subscribers are always safe.

A cloud database has its own pros. Let us take the case of Xeround’s cloud database service. I like the fact that whenever the database gets full whatsoever with data, it automatically scales out when it needs to. It even shrinks back when you do not need it to.

Providers like Xeround ensures that there is no downtime. Even a fraction of a second can mean losses to a company if its database service is down. Xeround’s replicated, self healing architecture ensures the clients’ MySQL database is always available.

This is a good thing, right? If you manage your own database and databaser server, you will also have to take into account security and costs of hiring personnel to make sure the database is up and running all the time.

Deployment is fairly easy too. Simplicity is what I like best with regards to Xeround’s service. A 1 click deployment requires no changes to your applications and even zero maintenance for your DB in the cloud.

The word cloud itself is really not a new technology. It has been around for a very long time. Think about the cloud as just a term for an existing technology.

Xeround is fair when it comes to using its service. Users who have no clue how Xeround’s services works can take advantage of a 1 month free trial to try the Cloud database itself.

And considering its service is a database-as-a-service type, it simplifies the way databases are managed in the cloud.

If you want to save yourself the cost of having to hire extra personnel to manage your database’s security, uptime and maintenance, I recommend you check out Xeround to start with instead.

Found this useful? Donations appreciated to help keep this blog alive.

Extract SQLite Database From Android Emulator

Make sure your Android emulator is running. Else, you will not be able to even find the database file.

In Eclipse, go to Window > Show View > Other, then choose File Explorer (it has an Android icon).

Within the File Explorer tab, the database file of your app is located in

Highlight the database file and click the icon on the upper right that looks like a diskette with a tooltip that says “pull a file from the device”.

That should get you your SQLite database file.

Found this useful? Donations appreciated to help keep this blog alive.

Related Posts Plugin for WordPress, Blogger...