Posted by Tony Marston on 01/23/06 05:50
"ming" <myhusky@gmail.com> wrote in message
news:vEWAf.9838$43.6013@nnrp.ca.mci.com!nnrp1.uunet.ca...
>I think it the -> problem. php5 class is different with php4 class
No, this works in both PHP 4 and 5 as I use it all the time.
> Jon wrote:
>> function query($query, $return = false)
>> {
>> $fetch = mysql_query($query, $this->connection) or
>> die2(mysql_error($this->connection));
>> if($return)
>> return $fetch;
>> }
>>
>> mysql_error(): supplied argument is not a valid MySQL-Link resource
>>
>> the line that begins with $fetch is my problem. This was originally a
>> PHP5 script that I am retrofitting.
>> The $query is used all over, and it is really gumming things up.
Ths function can only be used in an object as $this->connection refers to a
property called $connection within the current object. Have you checked to
see if $this->connection actually refers to a valid resource? Where did the
previous call to mysql_connect() store its result?
--
Tony Marston
http://www.tonymarston.net
>> Thanks!
>> jon
>>
[Back to original message]
|