Vote Up 0 Vote Down

install Php-mysqli With Linux Mint

I have an issue with my OS.
I have Linux Mint, and the problem is that when I'm running my code through y Konsole, there's a problem with a file and the name is MySQLi extension ...
i havent found a guide of how can i install it, i don't know if its from the terminal, or i need a guide of how just instal that extension, 'cause this is a part of the code:

$db = new mysqli("localhost", "petermac", "password", "library");
// Make sure the above credentials are correct for your environment
if($db->connect_error) {
die("connect Error({$db->connect_errno}) {$db->connect_error}");
$sql = "SELECT * FROM books WHERE available = 1 ORDER BY title";
$result = $db->query($sql1);

And in the second line is the use of the syntax " mysqli " ..|
So, could you help me ???


Vote Up 0 Vote Down
See One thing Here, Recommended When you use the Mysqlnd for Compilation .

 $ ./configure --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql=mysqlnd
flag | link |
Vote Up 0 Vote Down
Use this command

 sudo apt-get install php5-mysql

then edit "php.ini" and enable it by commenting

REMBER php-cli have it's own php.ini, use command in terminal

 locate php.ini
flag | link |

Your Answer

Login before answering

Login with facebook