versatilewt Posted April 9, 2006 Share Posted April 9, 2006 php version: 4.3.10adodb version: 4.8I'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? Link to comment https://forums.phpfreaks.com/topic/6951-html_quickform-adodb-custom-validation-rule-problem/ Share on other sites More sharing options...
versatilewt Posted April 9, 2006 Author Share Posted April 9, 2006 removed Link to comment https://forums.phpfreaks.com/topic/6951-html_quickform-adodb-custom-validation-rule-problem/#findComment-25254 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.