Selecting NULL value from the database

There is no specific issue with retrieving null values from the database. They will come back as the PHP NULL value. WordPress uses either the function mysqli_fetch_object or mysql_fetch_object to retrieve results from the database. https://php.net/manual/en/function.mysql-fetch-object.php https://php.net/manual/en/mysqli-result.fetch-object.php According to those respective pages: Note: This function sets NULL fields to the PHP NULL value. Are you … Read more

Add value to array in database

Your table does not have a timeofvisit column. The second value of $wpdb->insert expects column value pairs, see here. Try $wpdb->insert( $table_name, array( ‘timestamparray’ => $timeofvisit, ‘userid’ => ‘2’ ) );

Sending WordPress database information to cross domain the safe way?

If you have to do this with php then you are going to want to use the WP_Http class. Specifically, you’ll probably want to use wp_remote_post(). Something like this should get you started. function pushData($data){ //data is an associative array of the things you want to send $url = “https://yourhost.com/your_catch_script.php”; return wp_remote_post($url, array( ‘method’ => … Read more

live site do not update after importing sql database

I had something similar, entries of some post types didnt show. If your posts have the same IDs between dev/live environment, get the edit URL and replace the ID to see if it loads. Like : http://yoursite.com/wp-admin/post.php?post=23&action=edit Replace the ID (here ’23’) by the ID of the post/page/anythingelse you cannot see in live. If this … Read more