当前位置: 首页>>代码示例>>PHP>>正文


PHP sql_query::get_data方法代码示例

本文整理汇总了PHP中sql_query::get_data方法的典型用法代码示例。如果您正苦于以下问题:PHP sql_query::get_data方法的具体用法?PHP sql_query::get_data怎么用?PHP sql_query::get_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sql_query的用法示例。


在下文中一共展示了sql_query::get_data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: die

         //keep query string
         $bolShowLogin = 0;
         //By default this is one until someone logs in.
         $dbconn = mysql_connect($db_hst, $db_un, $db_pw) or die($msg_conn_err . " {$db_hst}, {$db_un}, {$db_pw}");
         mysql_select_db($db) or die($db_err);
         $result = mysql_query("UPDATE {$db_tbl_name_sessions} SET {$db_col_name_sessions_sid_time} = UNIX_TIMESTAMP() WHERE {$db_col_name_sessions_sid} = {$sid};");
         mysql_close($dbconn);
     }
 } elseif (isset($_POST[$form_pw])) {
     $pw = clean_string_for_db($_POST[$form_pw], $MAX_PASSWORD_LENGTH);
     $obj = new sql_string($db_tbl_name_members);
     $obj->set_db_col_aliases(array($db_col_name_member_pw));
     $obj->set_db_where($db_col_name_member_pw . " = '" . $pw . "'");
     $str_SQL = $obj->get_SQL();
     $obj = new sql_query($db_hst, $db_un, $db_pw, $db, $str_SQL);
     $ary_data = $obj->get_data();
     if ($ary_data == 0) {
         print "Invalid Password<br>";
     } else {
         //Delete old entries in tblSessions
         $dbconn = mysql_connect($db_hst, $db_un, $db_pw) or die($msg_conn_err . " {$db_hst}, {$db_un}, {$db_pw}");
         mysql_select_db($db) or die($db_err);
         $result = mysql_query("DELETE FROM {$db_tbl_name_sessions} WHERE UNIX_TIMESTAMP() - {$db_col_name_sessions_sid_time} > {$MAX_UPDATE_SESSION_TIME};");
         //Create sid
         $sid = rand(1000, 9999) . date("j") . rand(1000, 9999);
         //Insert sid into table
         $result = mysql_query("INSERT INTO {$db_tbl_name_sessions} SET {$db_col_name_sessions_sid} = {$sid}, {$db_col_name_sessions_sid_time} = UNIX_TIMESTAMP();");
         if ($result == 0) {
             print "error insert<br>";
         } else {
             $qs = $qs . $db_col_name_member_sid . "=" . $sid;
开发者ID:imupmyass,项目名称:imupmyass.github.io,代码行数:31,代码来源:site_processing.php


注:本文中的sql_query::get_data方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。