Where is phpMyAdmin inside WordPress?

phpMyAdmin is software typically installed by your host and available via your hosting control panel, it is not part of WordPress. A search on web for [your host] phpMyAdmin will probably tell you what you need to do.

Get value form wordpress database

There’s a wpdb class in WordPress for you to be able to read/write DB. To get variable from table, use $wpdb->get_var function. This way: //set current page ID or define ID in another way – depends on your code $my_page_id = get_the_ID(); global $wpdb; $ListingID = $wpdb->get_var( “SELECT listing_id FROM “.$wpdb->prefix.”fsrep_listings WHERE ID = ” … Read more

SQL Query in WordPress – Getting Impossible WHERE error

Look at your conditions: WHERE ( ( (meta_key=’user_school_subjects’ AND meta_value LIKE ‘%history%’) OR (meta_key=’user_professional_courses’ AND meta_value LIKE ‘%history%’) OR (meta_key=’user_language_tutoring’ AND meta_value LIKE ‘%history%’) OR (meta_key=’user_music_tutoring’ AND meta_value LIKE ‘%history%’) ) AND (meta_key=’user_gender’ AND meta_value=”male”)) There is no way that you can have a meta key matching one of these– user_school_subjects, user_professional_courses, user_language_tutoring, user_music_tutoring … … Read more

Query multiple tables at once?

SELECT * FROM wp_posts, wp_2_posts, wp_3_posts WHERE wp_posts.post_content LIKE ‘%foo’ OR wp_2_posts.post_content LIKE ‘%foo’ OR wp_3_posts.post_content LIKE ‘%foo’; should do the trick. (Note that in Multisite, there shouldn’t be a wp_1_posts — your root site uses wp_posts etc.)

I’m not able to get access to $wpdb [duplicate]

If you’re not using WP’s built in Ajax handlers, which includes things for you, you will need to include the WP core yourself. Try adding define(‘WP_USE_THEMES’, false); global $wpdb; require(BASE_PATH . ‘wp-load.php’); to the top of your file. I should point out that the path to wp-load.php may not be the same and hard coding … Read more

Which is better and faster ? WordPress Queries or SQL Query

Queries ofcourse. It’s faster… But in this case just please delete you wp site and start with something faster… here is my superfast framework for you… <?php /*Your bunny wrote */ I did tests, 0.0000001 runtime vs WP usually 0.7-2.8 Sarcasm off P/S/ This question have no sence since using direct queries and output of … Read more

Insert Query not working in the form

I figured out my error in the query, Thank you all guys for responding, I just gave the piece of code <?php global $wpdb; $contactus_table = $wpdb->prefix.”contactus”; //error with the query $sql = “INSERT INTO $contactus_table (firstname, lastname, email, query, reg_date) VALUES (‘$firstName’, ‘$lastName’, ‘$email’, ‘$query’, CURRENT_TIMESTAMP)”; if($wpdb->query($sql)) { $BlogName = get_bloginfo(); echo $BlogName; } … Read more