lundi 14 mars 2016

wpdb update doesn't work (error 500)

I don't know why wpdb->update doesnt work! Everything looks fine but it still return error 500. I found out by commenting that the problem is wpdb->update but can't sort it out why exacly?

this is my php function:

<?php
if (isset($_POST['submit'])) {

    global $wpdb;

     $table_name = $wpdb->prefix . 'isidos_tvshowprogram';

     $comment = $_POST['ProgramTitle'];
     $fullDate = $_POST['FullDate'];
     $changedPart = $_POST['ProgramTime'];

     $updatedDate = substr_replace( $fullDate, $changedPart, 10, 5);

     $data_update = array('programtime' => $updatedDate ,'tvshowname' =>$comment);
     $data_where = array('id' => $_POST['Id']);
     $wpdb->update($table_name , $data_update, $data_where);

}
?>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire