My site http://world2build.hol.es i tried to upgrade mysql to mysqli so i changed all of the mysql_ to mysqli_ but it broke the site
Asked
Active
Viewed 28 times
1 Answers
-1
With mysqli you have to send the connection with the query. Like this:
<?php
$con=mysqli_connect("localhost","my_user","my_password","my_db");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// Perform queries
mysqli_query($con,"SELECT * FROM Persons");
mysqli_query($con,"INSERT INTO Persons (FirstName,LastName,Age)
VALUES ('Glenn','Quagmire',33)");
mysqli_close($con);
?>

Von
- 1
- 1
-
Other parts of the site is also broken. Ex: http://world2build.hol.es/Groups/ It has a header. I already changed the landing thing on my sire using your code – Classic Productions Jul 19 '17 at 21:07
-
Yes, you're going to have to look at the errors and track down everywhere you are using the mysqli_ functions and add that second param. – Von Jul 19 '17 at 21:31
-
Okay ill start doing that. – Classic Productions Jul 19 '17 at 21:39