Date: 02/28/01
- Next message: Bryan Willett: "[phplib] extended db_sql for updateable record set"
- Previous message: ananthapalli murthy: "[phplib] Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I had the similar problem before, with errors at the
"insert" query instead of the
"update" query. (I was using MySQL.) I fixed it last
summer, essentially doing the same thing that the
patch does. I wonder when will the bug get fixed in
the official distribution?
I think the patch only works if the original error
message was about
the "insert" query (i.e. $iquery).
In your case, You might want to check the MSSQL
documentation, and see when does an UPDATE query get
an error. If MSSQL returns
error when there's nothing to update, then that could
be what happened....
In that case you can do a "SELECT...from...where
sid=...and name=..." query first, and if result is
empty do $iquery, otherwise do $uquery.
Best Regards,
Albert
--- Prasad RL <rlsp <email protected>> wrote:
>
> Thanks for the patch. But I still get the same error
> message.
>
> The execution halts with error immediately when
> $this->db->query($uquery);
> is executed.
>
> I could trace this out by simple debugging..
> echo "before query";
> $this->db->query($uquery);
> echo "after query";
>
> Which obviouslly prints only 'before query', meaning
> that the control is not passed on to any of the
> further lines where the patch is provided. why does
> this happen ? and why does the session *halt* with
> the error message when the Update query is executed
> ?
>
> Could the problem have orginated from start()
> function in session.inc.. ? or is it because of any
> bug in database functions in db_mssql.inc ?
>
> Any help would be highly appreciated,
>
> thanks,
>
> Sivaprasad R.L.
>
>
>
>
>
>
>
>
> ------------- Original Message --------------
> "Nels Lindquist" <nlindq <email protected>> wrote:
> To:phplib <email protected>
> From:"Nels Lindquist" <nlindq <email protected>>
> Date:Thu, 15 Feb 2001 11:23:22 -0700
> CC:"Prasad RL" <rlsp <email protected>>
> Subject: Re: [phplib] ct_sql bug - PHPLIB &
> page_close()
>
> On 15 Feb 2001, at 8:55, Prasad RL wrote:
>
> > I know this problem has been discussed before. But
> then
> > unfortunatly, i still find the bug has not been
> fixed.
> >
> > The problem seems to be in ac_store() function in
> ct_sql.inc.
> >
> > My observations were that
> >
> > 1. Surprisingly though the page_open() function
> doesnt create any
> > entry in active_sessions table.
> >
> > 2.When page_close() function is called, it
> > gives the following error;
> >
> > Database error: Invalid SQL: update
> active_sessions set val='...',
> > changed='20010215030837' where
> > sid='8378099455e8f8f96958bc3fc3559cbd' and
> name='Example_Session'
> >
> > MSSQL Error: 1 (General Error (The MSSQL interface
> cannot return
> > detailed error messages).) Session halted.
> >
> > (pls note: this error doesnt appear when call to
> the page_close
> > function is removed)
> >
> > The program halts with the above error immediately
> when the query
> > "update active_sessions set val=.." is executed.
> >
> > What could be the cause of this error ?
> >
> > Why is the function trying to update when there's
> no entry in
> > active_sessions table. and why is the entry not
> created at first
> > point ?
> >
> > Any help would be highly appreciated.
> >
> > Thanks in advance,
> >
> > Sivaprasad R.L.
> >
> > p.s. I'm using phplib 7.2c (also tried with 7.2b)
>
> Attached is a patch for ct_sql.inc, to be applied
> against PHPLib 7.2c
> which will correct this issue.
>
> The patch incorporates John Mandeville's fix which
> was posted earlier
> this week, and my one-character fix for his fix. :-)
>
> Copy the patchfile to wherever you're keeping the
> PHPLib include
> files (probably ServerRoot/php) and run patch -p0 <
> patch-ct_sql in
> that directory.
>
> ----
> Nels Lindquist <*>
> Morningstar Systems Group
>
>
>
>
_____________________________________________________
> Chat with your friends as soon as they come online.
> Get Rediff Bol at
> http://bol.rediff.com
>
>
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> phplib-unsubscribe <email protected>
> For additional commands, e-mail:
> phplib-help <email protected>
>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Bryan Willett: "[phplib] extended db_sql for updateable record set"
- Previous message: ananthapalli murthy: "[phplib] Problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

