Jump to content

[SOLVED] call function from within a function (oop)


centenial

Recommended Posts

Hey,

 

I've been working on this (simple) MySQL class. It's gone well so far, but I can't seem to call a function from within a function inside the class.

 

I want to be able to call the safeSQL function inside the executeQuery function, so that everytime I run a query it automatically checks to make sure the "SQL" is "safe".

 

However, whenever I try to do that, I get this error:

 

Fatal error: Call to undefined function safeSQL() on line 53

 

Can't you call a function from within a function in a PHP class?

 

I appreciate your help. I'm kind of new to this whole OOP thing.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.