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 3838
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: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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,...
| |