We help IT Professionals succeed at work.

mysqli echo result

St_Aug_Beach_Bum
St_Aug_Beach_Bum asked
on
This is going to give me one result:

$results = $mysqli->query("SELECT VALUE FROM wp_cimy_uef_data WHERE USER_ID = '$UserID' AND FIELD_ID = '6'");
 
How is the best way echo that result?  Most of the examples I find are loops and rows, I just want the one result.

Thanks.
Comment
Watch Question

Fixer of Problems
Most Valuable Expert 2014
Commented:
No, it is not.  $result in this case is a reference that you can use to get the actual data.  You still have to use that in some sort of fetch statement.  Examples here:  http://php.net/manual/en/mysqli-result.fetch-array.php

Author

Commented:
Got it, thank you.
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
You're welcome, glad to help.