Jump to content

Archived

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

versatilewt

HTML_QuickForm, ADODB - Custom Validation Rule Problem

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?

Share this post


Link to post
Share on other sites

×

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.