function fetch_row($query, $autoclose = true)
{
if(is_string($query))
$query = self::query($query, true);
$return = mysql_fetch_row($query);
if($autoclose)
self::close($query);
return $return;
}
In PHP4 i get an error stating that the $query= self::query line
contains an "Undefined class name 'self'"
how, in general, can I take this and make it php4 compatible?$query is
defined as
function query($query, $return = false)
{
$fetch = mysql_query($query, $this->connection) or
die2(mysql_error($this->connection));
if($return)
return $fetch;
Any help would be appreciated...
Jon 3 3840
Jon wrote: In PHP4 i get an error stating that the $query= self::query line contains an "Undefined class name 'self'"
how, in general, can I take this and make it php4 compatible?>
When the class is instantiated, simply replace "self::" with "$this->"; when
used statically, replace it with "ClassName::".
JW
On 2006-01-22 16:10:43 -0600, "Janwillem Borleffs" <jw@jwscripts.com> said: Jon wrote: In PHP4 i get an error stating that the $query= self::query line contains an "Undefined class name 'self'"
how, in general, can I take this and make it php4 compatible?>
When the class is instantiated, simply replace "self::" with "$this->"; when used statically, replace it with "ClassName::".
JW
Thanks for your post, I think this will be immesly helpful. Now, one
last question to set me straight. How can I tell when a class is
instantiated vs. statically?
Thanks a bunch!
jon
Jon wrote: Thanks for your post, I think this will be immesly helpful. Now, one last question to set me straight. How can I tell when a class is instantiated vs. statically?
By the way it's called:
Instantiated: $class->method();
Statically: ClassName::method();
JW This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: jfancy-Transport Canada |
last post by:
I have this code here that reads in a javascript file and increases or
decreases font by its relative size (same thing as View, Text Size,
Large, small, etc.) I am developing this for Transport...
|
by: christer-sandberg |
last post by:
When I typecast a function and call it trough the casted pointer (se
code below) I get the warnings:
warning: function called through a non-compatible type
if this code is reached, the program...
|
by: Bucko |
last post by:
Hi guys,
I have an app that, right now, uses a SQL Server database and very
simple, universal SQL commands. I use SqlCommand, SqlDataReader and
SqlDataAdapter objects. I use web.config to...
|
by: max |
last post by:
Dear all,
I did the following analysis to conclude that the following pointer
types are not compatible. Please let me know If my analysis and
interpretation of the C standard are correct:
...
|
by: A.M |
last post by:
Hi,
I am planning to develop python applications on windows and run them on
Linux. Are ActivePython scripts compatible with Linux? Is there any
guideline that explains the compatibility...
|
by: ruediger.papke |
last post by:
Hello,
we want to build up a DB2- switchover cluster on 2 solaris machines,
where a db2-instance is switched from one server to another.
we have 2 machines (a,b) with OS solaris 5.9.
both...
|
by: GHUM |
last post by:
Hello,
I created lots of guids via pywintypes.CreateGuid() on windows.
Now I would like to run the same software on Linux / Solaris /
FreeBSD.
So I should produce "compatible" GUIDS on...
|
by: pavanip |
last post by:
Hi,
I have developed one windows application using vb.net. I have setup that application on windows operating system its working fine on windows os. Now I am trying to do that exe run on Mac...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |