473,320 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

here's how I solved it

here's how I finally did it with help from people here and other places.
What do you think?

function calcElapsedTime($pageVar, $timeVar) {
// calculates elapsed time in seconds
$seconds = intval((time()-$timeVar));
// puts in that and the associated page in a database
$conn = mysql_pconnect('yourhost', 'useridentification',
'yourpassword') or die(mysql_error());
mysql_select_db('databaseName', $conn);
$query = "INSERT INTO databaseTable VALUES ('".$pageVar."',
'".$seconds."')";
$result = mysql_query($query, $conn);
}
Jul 17 '05 #1
1 1398
"NotGiven" a écrit le 16/01/2004 :
here's how I finally did it with help from people here and other places. Did what? What do you think? Like is it nice, efficient, etc?
function calcElapsedTime($pageVar, $timeVar) {
// calculates elapsed time in seconds
$seconds = intval((time()-$timeVar));
// puts in that and the associated page in a database
$conn = mysql_pconnect('yourhost', 'useridentification',
'yourpassword') or die(mysql_error());
mysql_select_db('databaseName', $conn);
$query = "INSERT INTO databaseTable VALUES ('".$pageVar."',
'".$seconds."')";
$result = mysql_query($query, $conn);
}


I think you should have posted in reply of your own post because there
whitout any context it is no use. I guess you're after the "How can I
count the number of seconds a page is viewed".
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Geoff Turner | last post by:
Morning all, Below is a piece of code to deal with a deliberate error. Can someboby explain why, in run mode, 'errhandler' is not reached, but the error is caught by the standard error handler,...
8
by: KC | last post by:
I have written a parser using htmllib.HTMLParser and it functions fine unless the HTML is malformed. For example, is some instances, the provider of the HTML leaves out the <TR> tags but includes...
1
by: MKoleoso | last post by:
Problem: C#- Unable to create instance of a class implementing from an interface I have: namespace someNamespace { public __gc class SomeClass1 { }
1
by: Elad Volpin | last post by:
Hi, I have struggled for several hours with this issue until I've understood and solved my problem. However, my solution isn't necessarily an optimal one, and worse - I think that my...
49
by: Lauren Wilson | last post by:
Hi folks, Just wondered if, for the sake of clarity, it is permissible to post small image files of an error box along with a text message about a problem with Access?
5
by: alyssa | last post by:
I have written this to show table in the database on this datagrid...but when i implement my click event i had an error msg and i don't know how to correct it...here's the code.. private void...
4
by: David Waz... | last post by:
about another news group... These news groups are always pleas for help... How about a news group like: Microsoft.Public.DotNet.Solutions.Framework.aspnet or some other such structure......
2
by: Richard Lionheart | last post by:
Hi All, I generated a WebForm and created a Virtual Directory for it IIS. But I got an error message (shown below) saying something like my app lacked appropriate privileges. David Wang...
0
by: Just_a_fan | last post by:
Some folks have searched, from time to time, for a dual axis MSChart with different scales on the two Y axes. The sample, extracted from running code I wrote, produces a graph with MSChart (VB9)...
93
by: lorlarz | last post by:
Here, let's see what you JavaScript programmers have got Here is a place to share your large or larger full-blown JavaScript applications: real.comp.lang.js.apps (a new google group) Here is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.