本文整理汇总了PHP中MySQLDatabase::quoteString方法的典型用法代码示例。如果您正苦于以下问题:PHP MySQLDatabase::quoteString方法的具体用法?PHP MySQLDatabase::quoteString怎么用?PHP MySQLDatabase::quoteString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MySQLDatabase
的用法示例。
在下文中一共展示了MySQLDatabase::quoteString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MySQLDatabase
$dst_db = new MySQLDatabase();
$dst_db->dbconnect($dst_dbhost, $dst_dbuser, $dst_dbpass, 'uchome');
$userlist = array();
$src_db = new MySQLDataBase();
$src_db->dbconnect($src_dbhost, $src_dbuser, $src_dbpass, $src_dbname);
$strSQL = sprintf("SELECT uid, username,password,email,regip, regdate FROM uc_members ");
$result = $src_db->query($strSQL);
while ($myrow = $src_db->fetchArray($result)) {
/*
$user['uid'] = $myrow['uid'];
$user['username'] = $myrow['username'];
$user['password'] = $myrow['password'];
$user['email'] = $myrow['email'];
$user['regip'] = $myrow['regip'];
$user['regdate'] = $myrow['regdate'];
*/
/*
foreach($myrow as $key => $value)
$user[$key] = $value;
$userlist[] = $user;
*/
$strSQL = sprintf("REPLACE INTO oss_members (uid,username,groupid,password,dateline,updatetime,lastlogin,ip) \n\t\t\t\tVALUES (%d,%s,%d,%s,%d,%d,%d,%s)", $myrow['uid'], $dst_db->quoteString($myrow['username']), 2, $dst_db->quoteString($myrow['password']), $myrow['regdate'], $myrow['regdate'], $myrow['regdate'], $dst_db->quoteString($myrow['regip']));
echo $strSQL . ";\n";
// $dst_db->query($strSQL);
}
$src_db->freeRecordSet($result);
unset($src_db);
unset($dst_db);
?>