THis is more of a PHP issue, but:
When PHP evaluates variables in a double-quoted string, it sees your $this
(the object reference) and immediately evaluates it (just returning its
type - Object). If you want to tell PHP to dereference $this->PNPSES->ses
properly, do
$query = "INSERT INTO
table1(created,updated,ses) values(now(),now(),'".$this->PNPSES->ses."')";
or
$query = "INSERT INTO
table1(created,updated,ses) values(now(),now(),'{$this->PNPSES->ses}')";
The later method should work, according to the docs, but I haven't tried
it. For more info, see:
http://www.php.net/manual/en/language.types.string.php
and
http://www.php.net/manual/en/language.types.string.php#language.typ
http://www.php.net/manual/en/language.types.string.php#language.types.string
.parsing
-steve
At 05:19 PM 1/11/02 , [EMAIL PROTECTED] wrote:
>I've got the following query executing in my php code:
>
>$query = "INSERT INTO
>table1(created,updated,ses) values(now(),now(),'$this->PNPSES->ses')";
>MYSQL_QUERY($query);
>
>query executes fine, but when I look at the ses column in inserted row it
>says Object->ses instead of a value.
>
>Any ideas why?
+------------------------------------------------------------------------+
| Steve Edberg [EMAIL PROTECTED] |
| Database/Programming/SysAdmin (530)754-9127 |
| University of California, Davis http://pgfsun.ucdavis.edu/ |
+---------------------- Gort, Klaatu barada nikto! ----------------------+
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php