Code: Select all
SELECT Count(id) as pricnt from faultlog where (queueid=1 or queueid=2) and status<15 and priority=1I have the following session variables on the login screen:
Code: Select all
$result = mssql_fetch_array(mssql_query("SELECT id,(forename + ' ' + surname) as contact,company FROM contact WHERE username='" . $_POST['user'] . "' AND PWDCOMPARE('" . $_POST['pass'] . "',password)=1",$db));
//Check if the user is a customer
if ($result!=NULL){
$_SESSION['user'] = $result['contact'];
[color=#FF0040] $_SESSION['company'] = $result['company'];[/color]
$_SESSION['guid'] = $result['id'];
$_SESSION['level']=1;
$_SESSION['rights']=3;
$_SESSION['pfx'] = "C" . date('Y');
$_SESSION['conts'] = array ($result['id']);Any Ideas?