I gotta dum kweschin.
Here's muh code:
Expand|Select|Wrap|Line Numbers
- class dbServer{
- ...
- public function &executeDBCOMMAND($SQL=";"){
- $result = mysql_query($SQL);
- }
- public function connect(){
- echo 'Connecting to server ' . $this->servername . '<br>';
- $this->dbconnection = mysql_connect($this->servername,$this->username,$this->password);
- if(!$this->dbconnection){
- throw new Exception("did not connect");
- }
- return true;
- }
- ...
- }
- $s=$d=$t="x";
- $s = new dbServer("localhost","__MUNGED__","__MUNGED__") or die ("no dbserver");
- if($s<>'x') $s->connect() or die ("no dbserver");
- if($s<>'x') $d = new dbDatabase("__MUNGED__") or die ("no database");
- if($d<>'x') $d->connect() or die ("no database");
- if($d<>'x') $t = new dbTable("Table1") or die("no table");
- if($t<>'x')
- {
- try{
- $result =& $s->executeDBCOMMAND("show tables;");
- ///////////////////////////////////////////////////////////////
- //LINE 184 (where the error is)
- ///////////////////////////////////////////////////////////////
- $num=mysql_numrows($result) or die('<hr />MySQL Error: '
- .mysql_error(). '<hr />');
- ///////////////////////////////////////////////////////////////
- ...
- }
- catch{...}
- ...
- }
- ?>
Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /nfsexport/var/www/doc_root/info/no-ip/yourwebsite/jpenney/phpfiles/fieldlib.php on line 184
I think it's a problem with returning the reference, but I'm not sure. Any hints?
Thanks,
JP