I have decoded the Json and now want to submit in the database,
How can i use this query with where condition?
if(is_array($arr)){
$sql = "INSERT INTO wp_posts (post_title, post_type) values ";
$valuesArr = array();
foreach($arr as $row){
$email = mysql_real_escape_string( $row['property_name'] );
$post = mysql_real_escape_string( $row['post_type'] );
$valuesArr[] = "('$email', '$post')";
}
$sql .= implode(',', $valuesArr);
mysql_query($sql) or exit(mysql_error());
}