fastwings
-
Posts
1 -
Joined
-
Last visited
Never
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
have a problem in class and ADODB
in PHP Coding Help
Posted
i try connect the adodb user this code area
[code]<?
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");
}
.
.
.
?>
[/code]
and i try to enable sql selective
using this code
[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();
}
.
.
.[/code]
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]