Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Global the object.
- global $board1_db;
- // SQL query. Replace all parameters with question marks (that's how PDO does it).
- $sql = 'SELECT member_name
- FROM {db_prefix}members
- WHERE id_member = ?;';
- // Array or parameters. Params must have the same number, and order as question marks in the the SQL.
- /**
- * $param_array = array(
- * $identifier => $value,
- * );
- */
- $param = array(
- 1 => 1,
- );
- // Assign a variable to the data returned from the function.
- $myid = $board1_db->getone($sql, $param);
- // You know this part.
- echo'<pre>', print_r($myid), '</pre>';
Add Comment
Please, Sign In to add comment