note 56085 added to function.mysql-query
| From: | jack at osu1 dot php dot net | Date: | Tue, 23 Aug 2005 01:17:30 +0000 |
| Subject: | note 56085 added to function.mysql-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94059@lists.php.net to get a copy of this message | ||
Is it possible to have mysql_query NOT return a result? Or, put another way, is it possible to
suppress the result and therefore just have the query executed without generating anything in
return?
My problem is caused by the fact that I'm trying to track when a particular user is logged into
my website. When the user logs in, their online status is UPDATEd in the mySQL db. When the user
leaves the page, or closes the browser, Javascript captures the onUnload event and submits a form to
my php page that UPDATEs the db and registers the user as logged out. THe problem is that when the
user navigates to another webpage, the php script returns a result and prevents their intended page
from loading.
I'd like to find a simple php script that can _just_ UPDATE the db and not return a result,
allowing my user to go merrily on their way to another site.
----
Manual Page -- http://www.php.net/manual/en/function.mysql-query.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56085
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56085&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56085&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56085&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56085&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56085&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56085&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56085&report=yes
Search -- http://master.php.net/manage/user-notes.php