Notify me of new posts via email. Stack Overflow works best with JavaScript enabled. After you have connected, you can use the Active Record class normally to query the db, for example:. Well, I woundn’t do as suggested querying twice the database to get the count and then get the data I want. Description public int PDOStatement:: You can also specify failovers for the situation when the main connection cannot connect for some reason. GrumpyCrouton 3, 3 17

Uploader: Nelkis
Date Added: 9 July 2018
File Size: 54.76 Mb
Operating Systems: Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X
Downloads: 81812
Price: Free* [*Free Regsitration Required]

If, for example, you run multiple environments development, production, test, etc. This permits multiple CodeIgniter installations to share one database.

Post was not sent – check your email addresses! We’re having problem with these PDOStatement:: To display information only when the query is not codeignkter, I do something like this: This assumes you have your database under: I would have preferred if it were possible to overload the rowCount function from PDOStatement, but I don’t think it’s possible or I don’t know how to do it.

These failovers can be specified by sqlote3 the failover for a connection like this:. By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. Sorry, your blog cannot share posts by email. Remember that you need to build your codwigniter structures first with a tool such as phpLiteAdmin.


This site uses cookies.

You can subscribe via RSS 2. Example 1 Return the number of deleted rows. Sign up using Facebook. You are commenting using your Twitter account. Email Required, but never shown. I can’t find any documentation on how ;do use sqlite3 in CodeIgniter, but it does say that it is supported.

If more than one row responds to the SELECT query, the query returns still only one row and you don’t know which one exactly. Return Values Returns the number of rows.

Using CodeIgniter 2 with SQLite 3 databases | Living with technology

You can also set database connection values for specific environments by placing database. So if you use one SQL request to insert several rows at a time, and some are inserted, some are just updated, you won’t get the real count.

This is useful for distributed applications where you might run manually written queries, and need the coseigniter to still be customizable by the end user.

Thank you for this.



Note If you do not specify a DSN string for a driver that requires it, CodeIgniter will try to build it with the rest of the provided settings. Stack Overflow works best with JavaScript enabled. That looks like the Ci2 database lay out codeigniter.

If you do not specify a DSN string for a driver that requires it, CodeIgniter will try to build it with the rest of codeigniyer provided settings. The reason we use a multi-dimensional array rather than a more simple one is to permit you to optionally store multiple sets of connection values.

To use this value you have to add a line to the database config array. ED May 6 ’16 at Here is my current database configuration: You are commenting using your WordPress.

Living with technology Personal blog of Stanislav Khromov.

GrumpyCrouton 3, 3 17 By continuing to use this website, you agree to their use.