The Session variable issue in mysql select statement
Can anyone help me whith why thi s code does not work:
<?php require_once('Connections/ActionAssessing.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
session_start();
}
mysql_select_db($database_ActionAssessing, $ActionAssessing);
$query_rsClaim = "select ClaimID, Rego, UserID, ClaimNo FROM claim INNER JOIN users ON (users.UserID = users.UserID) WHERE
Rego = ".$_SESSION['Rego']." AND ClaimNo = ".$_SESSION['ClaimNo']." AND UserName = ".$_SESSION['kt_login_user']."";
$rsClaim = mysql_query($query_rsClaim, $ActionAssessing) or die(mysql_error());
$row_rsClaim = mysql_fetch_assoc($rsClaim);
$totalRows_rsClaim = mysql_num_rows($rsClaim);
echo $row_rsClaim['ClaimID'];
?>
Returns the following error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND ClaimNo = AND UserName =' at line 2
Thanks in advance.
___________________________________
SMART LIPO MPX
free song lyrics
Subject
Views
Written By
Posted
The Session variable issue in mysql select statement
7634
April 22, 2010 08:55PM
3473
April 23, 2010 07:36PM
3247
April 23, 2010 07:39PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.