What is difference between mysql and mysqli?



What is difference between mysql and mysqli?..

Answer / Neeraj Kamal

MySQL and MySQLi (pronounced as 'mys-qu-ey') are both database APIs for interacting with MySQL databases. The main difference is that MySQLi offers improved performance, security, and functionality over the older MySQL API by using prepared statements and object-oriented programming features.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What is delimiter in mysql trigger?

1 Answers  


How internally data stores in MyISAM and INNODB table types?

1 Answers   Zensar,


What are the 'mysql' command line arguments?

1 Answers  


How to create a trigger in mysql?

1 Answers  


How can we get total number of records by query in mysql?

1 Answers  


Differentiate CHAR_LENGTH and LENGTH?

1 Answers  


What is the use of mysqli_connect in php?

1 Answers  


How can I see connections in mysql?

1 Answers  


mysql> select * from store; +------+-------+-------+ | id | month | sales | +------+-------+-------+ | 1 | 1 | 100 | | 1 | 2 | 100 | | 1 | 3 | 200 | | 1 | 4 | 300 | | 1 | 5 | NULL | | 1 | 6 | 200 | | 1 | 7 | 800 | | 1 | 8 | 100 | | 1 | 9 | 240 | | 1 | 10 | 140 | | 1 | 11 | 400 | | 1 | 12 | 300 | | 2 | 1 | 300 | | 2 | 2 | 300 | | 2 | 3 | 300 | | 2 | 4 | 200 | | 2 | 5 | 200 | | 2 | 6 | 200 | | 2 | 7 | 100 | | 2 | 8 | 100 | | 2 | 9 | 300 | | 2 | 10 | 100 | | 2 | 11 | 150 | | 2 | 12 | 150 | +------+-------+-------+ this is my table. i need to display output like this. +------+----------+----------+----------+----------+ | id | quarter1 | quarter2 | quarter3 | quarter4 | +------+----------+----------+----------+----------+ | 1 | 400 | 500 | 1140 | 840 | | 2 | 900 | 600 | 500 | 400 | +------+----------+----------+----------+----------+ what single query i have to write for this. i tried this query and it displays like the below mysql> select id,sum(sales) as quarter1,(select sum(sales) from store where mont h>3 and month<7 ) as quarter2,(select sum(sales) from store where month>6 and mo nth<10)as quarter3 from store where month>0 and month<4 group by id; +------+----------+----------+----------+ | id | quarter1 | quarter2 | quarter3 | +------+----------+----------+----------+ | 1 | 400 | 1100 | 1640 | | 2 | 900 | 1100 | 1640 | +------+----------+----------+----------+ 2 rows in set (0.00 sec) tel me how to rectify it.

2 Answers  


How to delete an existing column in a table?

1 Answers  


Is mysql better than oracle?

1 Answers  


How do I view a mysql database?

1 Answers  


Categories