Changing MySQL password via WHM – does this affect WordPress?

If that changes the MySQL password that WordPress is using, and it sounds like it does, then yes you will have a problem, but not a big one. You’d need to edit wp-config.php and change define(‘DB_PASSWORD’,’oldpass’); to define(‘DB_PASSWORD’,’newpass’); Beyond that, the question is a CPanel question and would be off topic here. http://codex.wordpress.org/Editing_wp-config.php#Set_Database_Password

Make a database query using WordPress

if I understand you correctly, you might want something like this: global $wpdb; $number=30; // EDIT this to your needs $sql=”SELECT post_id FROM `wp_ak_popularity` ORDER BY `single_views` DESC LIMIT %d”; $my_top_posts = $wpdb->get_results($wpdb->prepare($sql,$number),ARRAY_N); to get an array of the top posts id’s. You could then use this in your WP_Query: ‘post__in’ => $my_top_posts

Creating Database Table vs. Adding MetaData to Post & User

While you might not be writing a plugin specifically, this resource will still be pertinent: http://codex.wordpress.org/Writing_a_Plugin#Plugin_Development_Suggestions From the codex Use the existing database tables instead of creating new custom tables if possible. Most use-cases can be accomplished with custom post types and meta data, custom taxonomy and/or one of the other standard tables and using … Read more

php include not working in custom page

WordPress has its own connection class, which can be used trough the $wpdb object. Is there a particular reason to use direct queries to the db, instead the wordpress functions (get_posts, get_post_meta, get_option)? Keep in mind that by doing this, you loose a lot of the wordpress tools, such as cache, filters, etc…

Should I use WordPress to skin a database website?

WordPress is an ecosystem of its own, and it’s pretty fat in terms of memory use and existing APIs and structures. Integrating this huge behemoth with a lean back-end that you have already built on your own won’t make much sense unless you specifically want to use WP’s back-end functionality instead of yours. WordPress themes … Read more

wpdb prepare insert table doesn’t work

I’m pretty sure that first SQL query isn’t correct SQL (insert has different syntax) 😉 It should be: INSERT INTO {$wpdb->prefix}awpcp_adphotos (ad_id, image_name, disabled, isprimary) VALUES (%d, %s, %d,%d) In second example, I’m almost sure that ad_id is not string, and image_name is not a number. Of cours I’m only guessing, because I haven’t seen … Read more