I have the following code in use as an after successful login event:
function AfterSuccessfulLogin()
{
//** Custom code ****
// put your custom code here
global $conn;
$strSQL = "select * from account,contacts where account.user_name='".$_SESSION["UserID"]."'";
$rs = db_query($strSQL,$conn);
$data=db_fetch_array($rs);
$_SESSION["account.account_id"]= $data["account.account_id"]; $_SESSION["user_name"]= $data["user_name"]; $_SESSION["password"]= $data["password"]; $_SESSION["title"]= $data["title"]; $_SESSION["contact_name"]= $data["contact_name"];
$_SESSION["contact_email"]= $data["contact_email"]; }
Tables account and contacts both have a column account_id and user_name. On an add page I am trying to use drop down lists and filter according to the logged in user. However, when I put in the following as the WHERE condition : , I get this error message:
[color=#FF0000]odbc_exec() [function.odbc-exec]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'account_id='., SQL state 37000 in SQLExecDirect
This worked ok before I purchased the software and went from 3.1 trial to v 4.0.
Anyone help please?