sql - Display results from a query with PHP (Wordpress) -
Trying to display results in a SQL query in PHP:
SELECT * Wp_celebcount From the calculation of ORDER DESC
I am trying to display two columns: wp_celebcount.name
& amp; I have a problem getting results for showing with PHP - I have to show this result on my index.php Wordpress theme file. Thanks for the help ...
If you are using Wordpress, then something like this will happen:
Global $ wpdb; $ Result = $ wpdb- & gt; Get_results ('select name, count wp_celebcount from'); '; Forex Currency ($ result as $ line) {echo 'name:'. Line-> Name. ', Calculation:'. $ Line-> Count. '& Lt; Br / & gt; '; }
This is recommended using the $ wpdb
Global as it takes care of all the database setup for you.
$ wpdb
can be found.
Comments
Post a Comment