Jump to content


Photo

have a problem in class and ADODB


  • Please log in to reply
No replies to this topic

#1 fastwings

fastwings
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 07 August 2006 - 01:54 PM

its like this have this file
i try connect the adodb user this code area
<?
if (!defined("Site_Path")) {
define("Site_Path",dirname(__FILE__));
}
if (!defined("_ServerCrc")) {
define("_ServerCrc" , md5($_SERVER['HTTP_HOST']));
}
include (Site_Path."/configs/db.conf");
include (Site_Path."/libs/core/functions.inc");
include (Site_Path."/libs/core/Db.cls.inc");
include (Site_Path."/libs/Driver/adodb.inc.php");
include (Site_Path."/libs/smarty/Smarty.class.php");
$smarty = new Smarty;
$smarty->template_dir = 'tpl/';
$smarty->compile_dir = 'cache/Tpls/';
$smarty->config_dir = 'configs/';
$smarty->cache_dir = 'cache/';
if (!is_a($Db)) {
$Db = new DbStrc(__DbCache__);
$Db->debug = true;
}
$not_enter = array("login" , "post");
if (!in_array($_GET['atc'],$not_enter)) {
if (!$_SESSION['UserName']) {
redirect_url_by("index.login");
}
.
.
. 
?>
and i try to enable  sql selective
using this code
.
.
.
$arrTab = array(
    TB_users
    );
    $arrFil = array(
    array(TB_users , "id as id"),
    array(TB_users , "username as username") ,
    array(TB_users , "password as pass") ,
    array(TB_users , "usertype as is_admin") ,
    array(TB_users , "loged as loged")
    );
    $pass = md5(sha1(md5(base64_encode(bin2hex(hexdec(md5($_PO  ST[password])))))));
    $user = $_POST[username];
    if ($pass&&$user) {
     echo $user;
     $where = TB_users .".username = '".$user."' and ".TB_users .".password = '$pass'";
     $Db->genrate_Sql($arr,0,$arrFilm,$where);
     $recordSet = $Db->GetLnk();
     if ($recordSet->RecordCount()!=0) {
     $err = $user;
     $_SESSION['UserName'] = $user;
     redirect_url_by("index");
     }
     $recordSet->Close();
    }
.
.
.
the problome that it's give any date
and its say that $recordSet->RecordCount()!= is not object and its most be object plz how i can fix this thx in advs if some not understand plz tell me

[attachment deleted by admin]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users