$user_id=123456; $q=new Query; $q ->select( array( '`user`.`user_id`', '`user`.`name`', '`user`.`email`' ) ) ->from('`user`') ->where_equal_to( array( '`user_id`'=>$user_id ) ) ->limit(1) ->run(); if($q){ $user=$q->get_selected(); echo 'Hello '.$user['name'].', '. 'Your email is currently set to '.$user['name'].' '. 'and your user id is '.$user['user_id'].'. '. ''; }else{ echo'Sorry, user '.$user_id.' not found.'; }
Comments
Leave a Reply