Habe ein kleines Problem, habe ein Query womit ich falls der Datensatz vorhanden ist und verändert wurde alle Felder einmal Update. Der Code sieht wie folgt aus:
PHP
$update = $wpdb->query($wpdb->prepare(
"UPDATE immobilien
SET
'title' => $title,
'zipcode' => $zipcode,
'city' => $city,
'street' => $street,
'object_art' => $object_art,
'expose_img_count' => $expose_img_count,
'added' => $added,
'processed' => $processed,
'purchase_price' => $purchase_price,
'rental_price' => $rental_price,
'room' => $room,
'bedroom' => 2,
'bathroom' => 2,
'living_area' => $living_area,
'usable_area' => $usable_area,
'construction_year' => $construction_year,
'energy_pass' => $energy_pass,
'buyer_prov' => $buyer_prov,
'object_categorie' => $object_categorie,
'description' => $description,
'img_path_list' => $img_path_list,
'land_area' => $land_area,
'free_at' => $free_at,
'power_consumption' => $power_consumption,
'energy_efficiency_support' => $energy_efficiency_support
WHERE online_number = $online_number"
));
Alles anzeigen
Error: Uncaught ArgumentCountError: Too few arguments to function wpdb::prepare()
MIt welchem wpdb argument kann ich den alle felder updaten? Dachte diese wäre dafür da. Entschuldigt meine "dummheit" gerade..