Date: 11/28/00
- Next message: vimcat: "[phplib] template question - please help!"
- Previous message: Ivan Jager: "[phplib] Patch for sqlquery.inc"
- Next in thread: vimcat: "[phplib] template question - please help!"
- Reply: vimcat: "[phplib] template question - please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
building an e-shop with templates, sessions and cart I got bad trouble
with links from my startpage (without session) deep into a praesentation
page (with session).
On the linked page I got this error
Database error: Invalid SQL: insert into active_sessions ( sid, name,
val, changed ) values ('8874ba66bd8867848b43cc7e51f439e0', 'My_Session',
'TXlfU2Vzc2lvbjokdGhpcy0+aW4gPSAnMSc7ICR0aGlzLT5wdCA9IGFycmF5KCk7ICR0aGlzLT5wdFsnY2FydCddID0gJzEnOyAkdGhpcy0+cHRbJ2JhY2t0aWQnXSA9ICcxJzsgJEdMT0JBTFNbJ2NhcnQnXSA9IG5ldyBNeV9DYXJ0OyAkR0xPQkFMU1snY2FydCddLT5pdGVtID0gYXJyYXkoKTsgJEdMT0JBTFNbJ2NhcnQnXS0+Y3VycmVudEl0ZW0gPSAnMSc7ICRHTE9CQUxTWydjYXJ0J10tPmRhdGEgPSBhcnJheSgpOyAkR0xPQkFMU1snY2FydCddLT5kYXRhWydzdW1tZSddID0gJzAnOyAkR0xPQkFMU1snYmFja3RpZCddID0gJzAnOyA=',
'20001128163757')
MySQL Error: 1062 (Duplicate entry
'My_Session-8874ba66bd8867848b43cc7e51f439e0' for key 1)
Session halted.
Some hours later I found out,
that the problem was the function ac_store,
when it was called the second time.
Calling page_close() the "squery" returns $this->db->f(1) with the value
0 !
But the record has been inserted with the first call in page_open().
This will work:
in ct_sql.inc
change
if ( $this->db->affected_rows() == 0
&& $this->db->query($squery)
&& $this->db->f(1) == 0
&& !$this->db->query($iquery)) {
to
if ( $this->db->affected_rows() == 0
&& $this->db->query($squery)
&& $this->db->num_rows() == 0
&& !$this->db->query($iquery)) {
The system was a Mandrake-Linux 7.1 with php 3.0.16 and MySQL 3.22.32
This was my little tribute to the great work of the phplib people and
this list.
Thank you
Peter Schiedner
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: vimcat: "[phplib] template question - please help!"
- Previous message: Ivan Jager: "[phplib] Patch for sqlquery.inc"
- Next in thread: vimcat: "[phplib] template question - please help!"
- Reply: vimcat: "[phplib] template question - please help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

