Insert/Update Listings from Plugin

This topic contains 17 replies, has 3 voices, and was last updated by  Alex Rollin 6 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #407384

    Robert Strobel
    Expired Member
    Post count: 54

    Thanks a bunch Stiofan!!

    Here’s the code I used for any users who may have same query I had:

    
    
    
    global $wpdb, $plugin_prefix;
    	$existing = $wpdb->get_results($wpdb->prepare(
    				"SELECT * FROM {$wpdb->posts} p JOIN " . ($plugin_prefix . 'gd_customdir_detail') . " gd ON gd.post_id=p.ID WHERE gd.geodir_test_val=%d LIMIT 1",
    				array(1000)
    			));//works
    

    We’re set now. Thanks for the help again.

    #407400

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    If you want more than 1 result u need to remove the “LIMIT 1” from the query 🙂

    Stiofan

    #407406

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
Viewing 3 posts - 16 through 18 (of 18 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket