Welcome Guest, Not a member yet? Register   Sign In
DMZ 1.7.1 (DataMapper OverZealous Edition)

[eluser]danmontgomery[/eluser]
[quote author="J Maxwell" date="1282266119"]Has anybody else seen any of the following errors when using DataMapper DMZ with CodeIgniter 2.0?

Fatal error: Uncaught exception 'Exception' with message 'Unable to call the method "__constrict" on the class post' in C:\wamp\www\Falcon\application\libraries\datamapper.php:1248

Reading the DataMapper DMZ site it seems like, whilst not officially supported, DMZ might work with 2.0?[/quote]

Has nothing to do with CI version, you're calling __constrict instead of __construct in the class 'post'. Probably parent::__constrict()

[eluser]J Maxwell[/eluser]
Oh my. How embarrassing.

Thanks for being gentle!

[eluser]7amza[/eluser]
any reply?

[eluser]WanWizard[/eluser]
[quote author="7amza" date="1282270740"]any reply?[/quote]
You've created a new thread, so continue there.

Also, please remember that we all volunteer to help others, we're not sitting behind a keyboard just waiting for you to ask a question. Patience helps sometimes.
And don't forget we could be in a different timezone. When you posted this, I was on my way to get some needed sleep...

[eluser]7amza[/eluser]
Wan , im so sorry for that but really i posted the post here before i created new thread .
im sorry .

[eluser]Atas[/eluser]
Hello!

Does anybody know how can i do the following with DMZ ?

SELECT field_price * 3.90 AS result FROM table WHERE result < 100

Thanks in advance.

[eluser]Lucas Alves[/eluser]
Code:
$object->select('field_price * 3.9 as result',FALSE);
$object->having('result <',100);
$object->get();

You can't use WHERE with fields set with AS clause...

You can use
Code:
$object->select('field_price * 3.9 as result',FALSE);
$object->where('field_price * 3.9 <',100);
$object->get();
though.

[eluser]Atas[/eluser]
Thanks Lucas.

I have other question, sorry...

Can i use IF STATMENTS on querys with DMZ? i am reading http://www.overzealous.com/dmz/pages/functions.html but i don't know how can i do that...

Thanks in advance...

[eluser]Lucas Alves[/eluser]
I think you can do this using select with escape option set to false too...

Can you paste the query ?

[eluser]backstack[/eluser]
What would be the best way to include DataMapperExt.php if I'm extending Datamapper itself (as opposed to simply include'ing it on every model)?




Theme © iAndrew 2016 - Forum software by © MyBB