I have a PHP project which has around 550 occurrences of the mysql_query function.
These need to be replaced by the corresponding MySQLi methods and prepared statements.
To give an example ($dbh is a PDO object that is available to you in every file):
$sql = "SELECT * FROM users WHERE id LIKE '$id' LIMIT 1";
$result = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_array($result);
$sql = "SELECT * FROM users WHERE id LIKE :id LIMIT 1";
$stmt = $dbh->prepare($sql);
$stmt->execute(array(':id' => $id));
$row = $stmt->fetch();
If you have any questions let me know.
31 freelancers están ofertando el promedio de €328 para este trabajo
Hello Good Day We are experts in mysql to PDO conversion. We can convert all 500+ mysql usages to PDO. Looking forward to work with you. Thanks Rinsad
Hi mate, I understand your problem mysql is deprecated now mysqli is using instead of mysql. It will take approx 6-7 days to change and test all the pages. Please initiate chat to discuss more. Regards
Hello, I've developed many applications with php and mysql. Sure I have enough experience to complete this job. Currently I am available and ready to start to work. Contact me, thanks...