2013-09-12 22:27:49 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
< title > Ryzom Account Management System: DBLayer Class Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< script type = "text/javascript" >
$(document).ready(function() { searchBox.OnSelectItem(0); });
< / script >
< / head >
< body >
< div id = "top" > <!-- do not remove this div! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
2013-09-13 22:39:03 +00:00
< td id = "projectlogo" > < img alt = "Logo" src = "logo.png" / > < / td >
2013-09-12 22:27:49 +00:00
< td style = "padding-left: 0.5em;" >
< div id = "projectname" > Ryzom Account Management System
2013-09-13 22:39:03 +00:00
  < span id = "projectnumber" > 1.0< / span >
2013-09-12 22:27:49 +00:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- Generated by Doxygen 1.7.6.1 -->
< script type = "text/javascript" >
var searchBox = new SearchBox("searchBox", "search",false,'Search');
< / script >
< div id = "navrow1" class = "tabs" >
< ul class = "tablist" >
< li > < a href = "index.html" > < span > Main  Page< / span > < / a > < / li >
< li > < a href = "pages.html" > < span > Related  Pages< / span > < / a > < / li >
2013-09-13 22:39:03 +00:00
< li class = "current" > < a href = "annotated.html" > < span > Data  Structures< / span > < / a > < / li >
< li > < a href = "files.html" > < span > Files< / span > < / a > < / li >
2013-09-12 22:27:49 +00:00
< li >
< div id = "MSearchBox" class = "MSearchBoxInactive" >
< span class = "left" >
< img id = "MSearchSelect" src = "search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
< input type = "text" id = "MSearchField" value = "Search" accesskey = "S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
< / span > < span class = "right" >
< a id = "MSearchClose" href = "javascript:searchBox.CloseResultsWindow()" > < img id = "MSearchCloseImg" border = "0" src = "search/close.png" alt = "" / > < / a >
< / span >
< / div >
< / li >
< / ul >
< / div >
< div id = "navrow2" class = "tabs2" >
< ul class = "tablist" >
2013-09-13 22:39:03 +00:00
< li > < a href = "annotated.html" > < span > Data  Structures< / span > < / a > < / li >
< li > < a href = "classes.html" > < span > Data  Structure  Index< / span > < / a > < / li >
2013-09-12 22:27:49 +00:00
< li > < a href = "hierarchy.html" > < span > Class  Hierarchy< / span > < / a > < / li >
2013-09-13 22:39:03 +00:00
< li > < a href = "functions.html" > < span > Data  Fields< / span > < / a > < / li >
2013-09-12 22:27:49 +00:00
< / ul >
< / div >
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "#pri-attribs" > Private Attributes< / a > < / div >
< div class = "headertitle" >
< div class = "title" > DBLayer Class Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
<!-- doxytag: class="DBLayer" -->
< p > Handles the database connections.
< a href = "classDBLayer.html#details" > More...< / a > < / p >
< table class = "memberdecls" >
< tr > < td colspan = "2" > < h2 > < a name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
2013-09-13 22:39:03 +00:00
< tr > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDBLayer.html#a800f8efee13692788b13ee57c5960092" > __construct< / a > ($db)< / td > < / tr >
< tr > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The constructor. < a href = "#a800f8efee13692788b13ee57c5960092" > < / a > < br / > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDBLayer.html#a33552c5325c469ac1aa0d049d2312468" > executeWithoutParams< / a > ($query)< / td > < / tr >
< tr > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > execute a query that doesn't have any parameters < a href = "#a33552c5325c469ac1aa0d049d2312468" > < / a > < br / > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDBLayer.html#a9a0e3ecb193fecd94263eda79c54bcc4" > execute< / a > ($query, $params)< / td > < / tr >
< tr > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > execute a query that has parameters < a href = "#a9a0e3ecb193fecd94263eda79c54bcc4" > < / a > < br / > < / td > < / tr >
< tr > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDBLayer.html#a9a8137347ec2d551de3ec54cfb3bdb1a" > executeReturnId< / a > ($query, $params)< / td > < / tr >
< tr > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > execute a query (an insertion query) that has parameters and return the id of it's insertion < a href = "#a9a8137347ec2d551de3ec54cfb3bdb1a" > < / a > < br / > < / td > < / tr >
2013-09-12 22:27:49 +00:00
< tr > < td colspan = "2" > < h2 > < a name = "pri-attribs" > < / a >
Private Attributes< / h2 > < / td > < / tr >
2013-09-13 22:39:03 +00:00
< tr > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classDBLayer.html#acdb2149c05a21fe144fb05ec524a51f3" > $PDO< / a > < / td > < / tr >
< tr > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > The PDO object, instantiated by the constructor. < a href = "#acdb2149c05a21fe144fb05ec524a51f3" > < / a > < br / > < / td > < / tr >
2013-09-12 22:27:49 +00:00
< / table >
< hr / > < a name = "details" id = "details" > < / a > < h2 > Detailed Description< / h2 >
< div class = "textblock" > < p > Handles the database connections. < / p >
< p > It uses PDO to connect to the different databases. It will use the argument of the constructor to setup a connection to the database with the matching entry in the $cfg global variable. < / p >
< dl class = "author" > < dt > < b > Author:< / b > < / dt > < dd > Daan Janssens, mentored by Matthew Lagoe < / dd > < / dl >
< / div > < hr / > < h2 > Constructor & Destructor Documentation< / h2 >
2013-09-13 22:39:03 +00:00
< a class = "anchor" id = "a800f8efee13692788b13ee57c5960092" > < / a > <!-- doxytag: member="DBLayer::__construct" ref="a800f8efee13692788b13ee57c5960092" args="($db)" -->
2013-09-12 22:27:49 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2013-09-13 22:39:03 +00:00
< td class = "memname" > < a class = "el" href = "classDBLayer.html#a800f8efee13692788b13ee57c5960092" > __construct< / a > < / td >
2013-09-12 22:27:49 +00:00
< td > (< / td >
< td class = "paramtype" > $  < / td >
< td class = "paramname" > < em > db< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > The constructor. < / p >
< p > Instantiates the PDO object attribute by connecting to the arguments matching database(the db info is stored in the $cfg global var) < / p >
< dl class = "params" > < dt > < b > Parameters:< / b > < / dt > < dd >
< table class = "params" >
2013-09-13 22:39:03 +00:00
< tr > < td class = "paramname" > $db< / td > < td > String, the name of the databases entry in the $cfg global var. < / td > < / tr >
2013-09-12 22:27:49 +00:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
< hr / > < h2 > Member Function Documentation< / h2 >
2013-09-13 22:39:03 +00:00
< a class = "anchor" id = "a9a0e3ecb193fecd94263eda79c54bcc4" > < / a > <!-- doxytag: member="DBLayer::execute" ref="a9a0e3ecb193fecd94263eda79c54bcc4" args="($query, $params)" -->
2013-09-12 22:27:49 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2013-09-13 22:39:03 +00:00
< td class = "memname" > < a class = "el" href = "classDBLayer.html#a9a0e3ecb193fecd94263eda79c54bcc4" > execute< / a > < / td >
2013-09-12 22:27:49 +00:00
< td > (< / td >
< td class = "paramtype" > $  < / td >
< td class = "paramname" > < em > query< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > $  < / td >
< td class = "paramname" > < em > params< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > execute a query that has parameters < / p >
< dl class = "params" > < dt > < b > Parameters:< / b > < / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > $query< / td > < td > the mysql query < / td > < / tr >
< tr > < td class = "paramname" > $params< / td > < td > the parameters that are being used by the query < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > returns a PDOStatement object < / dd > < / dl >
< / div >
< / div >
2013-09-13 22:39:03 +00:00
< a class = "anchor" id = "a9a8137347ec2d551de3ec54cfb3bdb1a" > < / a > <!-- doxytag: member="DBLayer::executeReturnId" ref="a9a8137347ec2d551de3ec54cfb3bdb1a" args="($query, $params)" -->
2013-09-12 22:27:49 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2013-09-13 22:39:03 +00:00
< td class = "memname" > < a class = "el" href = "classDBLayer.html#a9a8137347ec2d551de3ec54cfb3bdb1a" > executeReturnId< / a > < / td >
2013-09-12 22:27:49 +00:00
< td > (< / td >
< td class = "paramtype" > $  < / td >
< td class = "paramname" > < em > query< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > $  < / td >
< td class = "paramname" > < em > params< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > execute a query (an insertion query) that has parameters and return the id of it's insertion < / p >
< dl class = "params" > < dt > < b > Parameters:< / b > < / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > $query< / td > < td > the mysql query < / td > < / tr >
< tr > < td class = "paramname" > $params< / td > < td > the parameters that are being used by the query < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > returns the id of the last inserted element. < / dd > < / dl >
< / div >
< / div >
2013-09-13 22:39:03 +00:00
< a class = "anchor" id = "a33552c5325c469ac1aa0d049d2312468" > < / a > <!-- doxytag: member="DBLayer::executeWithoutParams" ref="a33552c5325c469ac1aa0d049d2312468" args="($query)" -->
2013-09-12 22:27:49 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2013-09-13 22:39:03 +00:00
< td class = "memname" > < a class = "el" href = "classDBLayer.html#a33552c5325c469ac1aa0d049d2312468" > executeWithoutParams< / a > < / td >
2013-09-12 22:27:49 +00:00
< td > (< / td >
< td class = "paramtype" > $  < / td >
< td class = "paramname" > < em > query< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > execute a query that doesn't have any parameters < / p >
< dl class = "params" > < dt > < b > Parameters:< / b > < / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > $query< / td > < td > the mysql query < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "return" > < dt > < b > Returns:< / b > < / dt > < dd > returns a PDOStatement object < / dd > < / dl >
2013-09-13 22:39:03 +00:00
< / div >
< / div >
< hr / > < h2 > Field Documentation< / h2 >
< a class = "anchor" id = "acdb2149c05a21fe144fb05ec524a51f3" > < / a > <!-- doxytag: member="DBLayer::$PDO" ref="acdb2149c05a21fe144fb05ec524a51f3" args="" -->
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > $PDO< code > [private]< / code > < / td >
< / tr >
< / table >
< / div >
< div class = "memdoc" >
< p > The PDO object, instantiated by the constructor. < / p >
2013-09-12 22:27:49 +00:00
< / div >
< / div >
< hr / > The documentation for this class was generated from the following file:< ul >
2013-09-13 22:39:03 +00:00
< li > /home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/< a class = "el" href = "dblayer_8php.html" > dblayer.php< / a > < / li >
2013-09-12 22:27:49 +00:00
< / ul >
< / div > <!-- contents -->
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
2013-09-13 22:39:03 +00:00
< a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(0)" > < span class = "SelectionMark" >   < / span > All< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(1)" > < span class = "SelectionMark" >   < / span > Data Structures< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(2)" > < span class = "SelectionMark" >   < / span > Files< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(3)" > < span class = "SelectionMark" >   < / span > Functions< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(4)" > < span class = "SelectionMark" >   < / span > Variables< / a > < / div >
2013-09-12 22:27:49 +00:00
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< hr class = "footer" / > < address class = "footer" > < small >
2013-09-15 16:27:07 +00:00
Generated on Sun Sep 15 2013 17:49:37 for Ryzom Account Management System by   < a href = "http://www.doxygen.org/index.html" >
2013-09-12 22:27:49 +00:00
< img class = "footer" src = "doxygen.png" alt = "doxygen" / >
< / a > 1.7.6.1
< / small > < / address >
< / body >
< / html >