LPH
Well-known member
This query is written wrong but every attempt to re-write it causes the update to the database to fail.
The first thing is prepare is not being used but I became confused about %s (string) and %d (integer).
The second thing is the double quotes cannot be used in this manner. I know the issue is in the {post->ID} but not sure how to fix it.
Does anyone have any suggestions?
Code:
$wpdb->query("UPDATE $wpdb->posts SET thread_id = '$thread_id' WHERE ID = '{$post->ID}'");
The first thing is prepare is not being used but I became confused about %s (string) and %d (integer).
The second thing is the double quotes cannot be used in this manner. I know the issue is in the {post->ID} but not sure how to fix it.
Does anyone have any suggestions?