本文整理匯總了PHP中MySQLDatabase::Prepare方法的典型用法代碼示例。如果您正苦於以下問題:PHP MySQLDatabase::Prepare方法的具體用法?PHP MySQLDatabase::Prepare怎麽用?PHP MySQLDatabase::Prepare使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MySQLDatabase
的用法示例。
在下文中一共展示了MySQLDatabase::Prepare方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: AddToDatabase
public function AddToDatabase()
{
$this->DB->Prepare("\n\t\t\tINSERT INTO tblIngredients\n\t\t\t\t(userID, type, title, description, baseIngredientID, createStamp, modifyStamp)\n\t\t\t\tVALUES\n\t\t\t\t(:userID, :type, :title, :description, :baseIngredientID, :createStamp, :modifyStamp)\n\t\t");
$id = $this->DB->Execute(array(":userID" => $this->Session->ID, ":type" => $this->Type, ":title" => $this->Title, ":description" => $this->Description, ":baseIngredientID" => Nullable($this->BaseIngredientID()), ":createStamp" => $this->CreateStamp, ":modifyStamp" => microtime(true)));
if ($id) {
$this->ID = $id;
}
singleLog("Created ingredient #{$id}");
return $id;
}