Guest User

Untitled

a guest
Oct 22nd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. // Global the object.
  2. global $board1_db;
  3.  
  4. // SQL query. Replace all parameters with question marks (that's how PDO does it).
  5. $sql = 'SELECT member_name
  6. FROM {db_prefix}members
  7. WHERE id_member = ?;';
  8.  
  9. // Array or parameters. Params must have the same number, and order as question marks in the the SQL.
  10. /**
  11. * $param_array = array(
  12. *   $identifier => $value,
  13. * );
  14. */
  15. $param = array(
  16.     1 => 1,
  17. );
  18.  
  19. // Assign a variable to the data returned from the function.   
  20. $myid = $board1_db->getone($sql, $param);
  21.  
  22. // You know this part. 
  23. echo'<pre>', print_r($myid), '</pre>';
Add Comment
Please, Sign In to add comment