MySQL ADODB Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am getting the following error:

 ErrorMsg for Database - Error:

There is no error being returned!  I cannot figure out what the problem is.
So I am hoping additional eyes will catch it for me.  I have debug set on
(as you will see in code below) and this is what is returned:

 (mysql): SELECT * FROM Alumni WHERE ((AlumID = 1) AND (Name_First =
"Xxxxxxx") AND (Name_Last = "Yyyyyy") AND (EMail = "1234@xxxxxxxx"))

It is correct.  I have the MySQL Query tool and have checked it out.
Everything looks good!

And here is the code:

    $secure_query = 'SELECT * FROM Alumni WHERE ((AlumID = 1) AND
(Name_First = "'.$_REQUEST['secfirst']
                    .'") AND (Name_Last = "'.$_REQUEST['seclast'].'") AND
(EMail = "'.$_REQUEST['secemail'].'"))';
    $db = mysql_connect($dbhost, $dblogin, $dbpass);
    $dbconn->SetFetchMode(ADODB_FETCH_ASSOC);
    $dbconn->debug=true;
     mysql_select_db($dbname, $db);
    $result = &$dbconn->Execute($secure_query);
    if (!$mysql_select_db) die ('ErrorMsg for Database - Error: ' .
$dbconn->ErrorMsg());
    if ($result->RecordCount() == 0)
      {
       die ('<font size="+2" color="red"><b>Error validating you. Cannot
continue.</b></font>');
      }
    $t->set_file('index', 'admin/index2.ihtml');
    $t->set_var("orgname", $orgname);
    $t->set_var("title", $areadesc);

I did have the SELECT statement after WHERE without the outer parends.  I
have tried many, many, many things and cannot get it to work right.  It
either accepts everything or rejects everything.  LOL  I can't win for
losing!  You can assume the field and other names are correct.  It has to be
a syntax error staring me in the eye somewhere.

Thanks in advance.

Mike

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux