Update database
-
Hi
Have a problem with update database nothing change.
Here is my code:global $wpdb; $outPut = $wpdb->get_results( " SELECT * FROM wp_topbanner " ); foreach ( $outPut as $(hidden)_top_banner ) { if(isset($_POST['submit_update'])) { global $wpdb; $wpdb->update( 'wp_topbanner', array( '(hidden)_top_banner_name' => $_POST['(hidden)_top_banner_name'], '(hidden)_top_banner_name_color' => $_POST['(hidden)_top_banner_name_color'], '(hidden)_top_banner_name_top_height' => $_POST['(hidden)_top_banner_name_top_height'], '(hidden)_top_banner_name_top_start_date' => $_POST['(hidden)_top_banner_name_top_start_date'], '(hidden)_top_banner_name_top_stop_date' => $_POST['(hidden)_top_banner_name_top_stop_date'], '(hidden)_top_banner_name_media' => $_POST['(hidden)_top_banner_name_media'], '(hidden)_image_attachment_id' => $_POST['(hidden)_image_attachment_id '] // integer (number) ), array( 'id' => $(hidden)_top_banner->id, ), array( '%s', '%s', '%s', '%s', '%s', '%s', '%d' ), array( '%d' ) ); }
Best Regards
MortenThe page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Update database’ is closed to new replies.