We have tried this way. But it is not working. please any one tell alternative method in wordpress
$wpdb->query("UPDATE ".$wpdb->prefix."recommend_bets SET `title`='".mysqli_real_escape_string($title)."',`category`='".$catID."',....
prefix."recommend_bet" /> prefix."recommend_bet" /> prefix."recommend_bet"/>
We have tried this way. But it is not working. please any one tell alternative method in wordpress
$wpdb->query("UPDATE ".$wpdb->prefix."recommend_bets SET `title`='".mysqli_real_escape_string($title)."',`category`='".$catID."',....
Sushma Biradar
On
You can use wpdb::_real_escape( string $string ) function.
https://developer.wordpress.org/reference/classes/wpdb/_real_escape/
Copyright © 2021 Jogjafile Inc.
When working with database in WordPress you should never use the low lever mysql_* or mysqli_* functions.
Always use $wpdb methods, in your case you should use prepare():