L
|
lucian author 5/30/2007 |
It works in this way: I want to find first name and surname of the logged user which are stored in "fullname" field from the table "users" when a new record is added and insert this data in a field "author". My function looks like this: function BeforeAdd(&$values) { global $conn; $strSQL = "select fullname from users where uname = '".$_SESSION["UserID"]."'"; $auth=db_query($strSQL,$conn); $values["author"]=$auth; return true; } I don't receive errors but the value inserted in "author" is "Resource id #13". Can anyone help me? |