Jump to content

HTML_QuickForm, ADODB - Custom Validation Rule Problem


versatilewt

Recommended Posts

php version: 4.3.10
adodb version: 4.8

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

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

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

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
[code]$result = $db->GetAll($query);        // Execute queries[/code]

Any ideas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.