Title: ragordon's Replies | WordPress.org

---

# ragordon

  [  ](https://wordpress.org/support/users/ragordon/)

 *   [Profile](https://wordpress.org/support/users/ragordon/)
 *   [Topics Started](https://wordpress.org/support/users/ragordon/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ragordon/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ragordon/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ragordon/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ragordon/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ragordon/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[ABASE] Abase – sql with parameter](https://wordpress.org/support/topic/abase-sql-with-parameter/)
 *  [ragordon](https://wordpress.org/support/users/ragordon/)
 * (@ragordon)
 * [11 years ago](https://wordpress.org/support/topic/abase-sql-with-parameter/#post-6175549)
 * Joseyaz
    I tried your suggestion and got an error. I am using the Abase shortcode
   in the sidebar. Maybe I don’t understand the use of ` ` I need to use a variable(
   $listing_id) as a search variable. in the code below hoaid= “$listing_id” –
 *  [abase table= “wp_awpcp_ads” columns = “ad_title, hoaid” notitle=”1″ where= “
   AND hoaid = ‘$lisitng_id’ ” echo=”0″]
 * Also in the sidebar I am retrieving the listing id (from a current directory 
   listing) with the following php, which works fine:
 *  <?php
    $id_or_slug = ”; if ( get_query_var( ‘listing’ ) || isset( $_GET[‘listing’]))
   $id_or_slug = get_query_var( ‘listing’ ) ? get_query_var( ‘listing’ ) : wpbdp_getv(
   $_GET, ‘listing’, 0 ); else $id_or_slug = get_query_var( ‘id’ ) ? get_query_var(‘
   id’ ) : wpbdp_getv( $_GET, ‘id’, 0 );
 * $listing_id = wpbdp_get_post_by_id_or_slug( $id_or_slug, ‘id’, ‘id’ );
    $field
   = wpbdp_get_form_field( 13); echo $field->display( $listing_id ); ?> <p> <?php
   echo $listing_id; ?> </p> <?php echo post_permalink( $listing_id ); ?>
 * I have been unable to come up with a way to grab this $listing_id (which is also
   the value in the other database in field hoaid) and use in in my Where clause.
 * Thanks
    ragordon

Viewing 1 replies (of 1 total)