i have to create a query inside a wordpress wordpress plugin however i could not look for a wordpress function and i am unsure is appropriate to make use of mysql_query

the functions i have found enable ordering and grouping but i have to use also join as well as in (list)

it is possible to way?


It appears like you would make use of the $wpdb class (that has functions for directly being able to access and adjusting the wordpress database). It allows you need to do such things as:

<?php $wpdb->query('select * from my_wordpress plugin_table where foo = "bar"') ?>

Documentation here.

To drag out rows maybe you'd use:

$myrows = $wpdb->get_results( "Choose id, title FROM mytable" )