Can I customised default WP table

I’ve checked and WordPress does, by default, retrieve & cache all post meta along with the main query’s posts, so you’re perfectly fine storing a product’s additional fields as standard post meta. You might want to store Brands (merchants? manufacturers?) as a custom taxonomy so that you can take advantage of built-in templates and queries … Read more

I cannot find the difference between these wp_capabilities values in wp_usermeta

You’ve posted some serialized arrays. The first entry, a:1:{s:13:”administrator”;s:1;} is corrupted – that’s not a valid serialized array. The second entry, a:1:{s:13:”administrator”;s:1:”1″;} looks like this when unserialized: array ( ‘administrator’ => ‘1’, ) The third entry, a:1:{s:13:”administrator”;b:1;} looks like this when unserialized: array ( ‘administrator’ => true, ) In my setup, capabilities are stored like … Read more

Understanding custom php that reads from WP MYSQL

Have you looked at the server log files (MySQL and PHP)? It could be several things: A MySQL permission issue on the db and/or table Table is named differently than stated in your code MySQL and/or WordPress are using older versions that don’t support certain syntax

Update multiple rows in one query

I googled a lot the last days and a few times i´ve seen postings that say that the $wpdb->update function doens´t support multiple updates and that this is not well documented. -> Sorry i don´t have links anymore… I think that this is true because i couldn´t get it to work and i found not … Read more

Create pages from MySQL database

You really should dive in more yourself. I’m not sure how good of a programmer you are, but you almost certain have to start to write a script that extracts all the information you want from the database and put this in an array. Once you’ve done that, you can use this data to create … Read more

Custom search query by category id

Try this code <?php $args = array( ‘s’ => $_REQUEST[ ‘search’ ], ‘cat’ => ‘category_id’, ‘paged’ => $paged ); // The Query $the_query = new WP_Query( $args ); // The Loop while ( $the_query->have_posts() ) : $the_query->the_post(); //inside the loop the_title(); the_content(); endwhile; // Reset Post Data wp_reset_postdata(); ?> Hope this help

Location of WP default mySQL tables creation file?

The SQL used to create the default tables is located in wp-admin/includes/schema.php inside wp_get_db_schema(): /** * Retrieve the SQL for creating database tables. * * @since 3.3.0 * * @global wpdb $wpdb WordPress database abstraction object. * * @param string $scope Optional. The tables for which to retrieve SQL. Can be all, global, ms_global, or … Read more