Jump to content


Photo

HTML_QuickForm, ADODB - Custom Validation Rule Problem


  • Please log in to reply
1 reply to this topic

#1 versatilewt

versatilewt
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 09 April 2006 - 03:37 PM

php version: 4.3.10
adodb version: 4.8

I'm using ADODB to connect to my mySQL database.

the query is
$query="SELECT * FROM zipData WHERE zipcode='$_z'";
    $result = $db->GetAll($query);        // Execute queries
    $count = count($result);        // Count * rows  


whenever it is like
function functionname(){
$query="SELECT * FROM zipData WHERE zipcode='$_z'";
    $result = $db->GetAll($query);        // Execute queries
    $count = count($result);        // Count * rows 
}

the query fails, but if i take it out of the function, the error doesn't occur (Fatal error: Call to a member function on a non-object). the error occurs on
$result = $db->GetAll($query);        // Execute queries

Any ideas?

#2 versatilewt

versatilewt
  • Members
  • PipPip
  • Member
  • 21 posts

Posted 09 April 2006 - 04:58 PM

removed




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users