query.get_col

/ Database / query.get_col

Title : query.get_col
Purpose : It Returns values of particular column. Use when you are expecting the output to be 1 column.
Syntax :
Input Parameters : query: (int) (Required) SQL query to execute.
Return Value : It returns: Database query result. Array indexed from 0 by SQL result row number.
Example 1 :
Code :
Output :
Description : The above example code will output the SQL query result in array as shown above. The query has return  values of column post_title from wp_post table.

 

Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *