Welcome Guest, Not a member yet? Register   Sign In
error while saving new object in datamapper
#1

[eluser]Unknown[/eluser]
Hi everyone, i have a little problem with my backend. i use DMZ Datamapper version 1.7.1.
what i'm trying to do is save a new data to my table, here example of my code
Code:
$check = new trperizinan_trproperty();
            $count = $check->where(array(
                        'c_parent' => $c_parent,
                        'trperizinan_id' => $trperizinan_id,
                        'trproperty_id' => $trproperty_id
                    ))->count();

            if (empty($count)) {
                $check->c_parent = $c_parent;
                $check->trperizinan_id = $trperizinan_id;
                $check->trproperty_id = $trproperty_id;
                $check->save();    
            }
my problem is, codeingniter returning warning like this and the data not inserted
Code:
Severity: Warning

Message: sprintf() [function.sprintf]: Too few arguments

Filename: libraries/datamapper.php

Line Number: 4158

but when i use $check->check_last_query() and executing the query returned in my MYSQL database, the query is valid and the data inserted.

anyone know solution this case?




Theme © iAndrew 2016 - Forum software by © MyBB