News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

new ps_DB?

Started by soulpad, December 11, 2007, 22:40:13 PM

Previous topic - Next topic

soulpad

Hi,

I've been looking into developing a new payment module and am having difficulty using the ps_DB class.

So I've taken to modifying another paypal related payment module, and I've attempted to create a new SQL query on the orderid. But I've hit a snag...

It appears I should code along the lines of...

$table=new ps_DB();
$qs="SELECT blah";
$table->query($qs);

But - how can I instantiate a new ps_DB without getting Fatal error: Cannot instantiate non-existent class: ps_db ?

I've checked around and virtuemart uses this class all over the place, so why do I get this error? I've tried declaring ps_database.php but to no avail. When I include ps_database.php I get a different error Fatal error: Class ps_db: Cannot inherit from undefined class database

I have checked through the developer manual - Anyone with any knowledge of this out there?

BTW - Sorry for the duplication but I made a very similar post elsewhere, just thought that this was probably a better forum for this question.

Kurosaki

where (in which file) do you add the line of new ps_DB() ?

gregdev

Yes, where are you doing this? Also, which versions of VirtueMart and Joomla?

Greg

[tr][td]
[/td][td]
www.plainlycode.com[/td][/tr]
[/table]

soulpad

Thanks for the responses, I think the errors were probably mine as I recently had a lot of trouble with my webhosts incorrectly setting up aliases. Not an easy one to trace I can tell you!