Cheetah
ChWsbProfileQuery.php
Go to the documentation of this file.
1 <?php
2 
8 require_once( CH_DIRECTORY_PATH_CLASSES . 'ChWsbDb.php' );
9 
11 {
12  function __construct()
13  {
14  parent::__construct();
15  }
16 
17  function getIdByEmail( $sEmail )
18  {
19  $sEmail = process_db_input($sEmail, CH_TAGS_STRIP);
20  return $this -> getRow( "SELECT `ID` FROM " . CH_WSB_TABLE_PROFILES . " WHERE `Email` = ?", [$sEmail]);
21  }
22 
23  function getIdByNickname( $sNickname )
24  {
25  $sNickname = process_db_input( $sNickname, CH_TAGS_STRIP );
26  return $this -> getRow( "SELECT `ID` FROM " . CH_WSB_TABLE_PROFILES . " WHERE `NickName` = ?", [$sNickname]);
27  }
28 
29  function getProfileDataById( $iID )
30  {
31  $iID = (int)$iID;
32  return $this -> getRow( "SELECT * FROM " . CH_WSB_TABLE_PROFILES . " WHERE `ID` = ?", [$iID]);
33  }
34 
35  function getNickName( $iID )
36  {
37  return $this -> getOne( "SELECT `NickName` FROM " . CH_WSB_TABLE_PROFILES . " WHERE `ID` = ?", [$iID]);
38  }
39 
40 }
process_db_input
process_db_input($sText, $iStripTags=0)
Definition: utils.inc.php:256
ChWsbProfileQuery\getIdByNickname
getIdByNickname( $sNickname)
Definition: ChWsbProfileQuery.php:23
ChWsbProfileQuery\getProfileDataById
getProfileDataById( $iID)
Definition: ChWsbProfileQuery.php:29
ChWsbProfileQuery\__construct
__construct()
Definition: ChWsbProfileQuery.php:12
php
ChWsbProfileQuery\getIdByEmail
getIdByEmail( $sEmail)
Definition: ChWsbProfileQuery.php:17
ChWsbDb\getRow
getRow($sQuery, $aBindings=[], $iFetchStyle=PDO::FETCH_ASSOC)
Definition: ChWsbDb.php:225
ChWsbDb\getOne
getOne($sQuery, $aBindings=[], $iIndex=0)
Definition: ChWsbDb.php:263
ChWsbProfileQuery
Definition: ChWsbProfileQuery.php:11
CH_TAGS_STRIP
const CH_TAGS_STRIP
Definition: utils.inc.php:22
CH_WSB_TABLE_PROFILES
const CH_WSB_TABLE_PROFILES
Definition: ChWsbDb.php:8
ChWsbProfileQuery\getNickName
getNickName( $iID)
Definition: ChWsbProfileQuery.php:35
ChWsbDb
Definition: ChWsbDb.php:13