On Dec 30, 2007 2:11 PM, alvaro <iorm@xxxxxxxxxxxxx> wrote: > I don´t know if this is the correct place to ask this questions but I > haver some doubts about using mysqli class in php. I am designing a web > place using wamp2 (php5, mysql 5.0.x ....). My databases have been done > using phpmyadmin so they are "normal" mysql, I mean that I have done nothing > with SQLITE. On the other hand, I am accessing to my databases and tables > using mysqli class and methods for example: > $conn = new mysqli ( ..........) (this is what I am using) > I am using that because I read in the internet that mysqli methods where > more efficient but I don´t know if it´s correct to use that methods with my > mysql database (it runs perfect). > > so... is it correct? supposing that it´s correct to use it......is it > faster and better to use mysqli methods than using the functions that were > used before these new classes appeared? <iorm@xxxxxxxxxxxxx> i believe the main reason for mysqli being 'better' than mysql is the object oriented approach to the api design. there may be other optimizations under the hood, but i am not aware of any off the top of my head (list: feel free to correct me). as per your overall system design, deciding to go w/ mysqli comes down to a few things - do you want to write all the sql by hand - do you plan on using a different database w/ the same system there are more questions of course but anyway; what im getting at is you might want to take a look at something like propel http://propel.phpdb.org/trac/ there are similar systems out there, but to summarize their features they essentially use a code generation paradigm to write all the database i/o in your system on your behalf; then you can just start using it. it is customizable as well. you will find pros / cons to such a system and a learning curve. but mainly i just want to acquaint you with such systems. anyway if youre not going to use something like that id say shoot for mysqli over mysql. -nathan