[PHP] Re: Count and Preg_Replace Using Version 4.4.1

2005-12-05 Thread Al
Shaun wrote: Hi, The following code matches all occurences of p tags within an html page and wraps form tags around it: echo preg_replace( '/p[^]*(.*?)\/p/ms', 'form name=form target=_parent action='.$CFG-edit_pages_adm.'/index.php?action=edit_paragraph method=post input

[PHP] Re: Count online users question

2003-11-27 Thread Kim Steinhaug
Cookies, or browsersession. I found the latter to be very easy to work with. -- Kim Steinhaug --- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't.

[PHP] Re: Count online users question

2003-11-26 Thread Al
I am trying to figure an accurate way to calculate how many users are viewing a site, at any particular time. This task is very simple except for one part - How do you determine when a person has left the site...apache hasn't served anymore requests from a particular ip for xx minutes ?? Hi

[PHP] Re: COUNT(*)

2003-08-01 Thread Craig Roberts
use mysql_fetch_rows(); $result=SELECT COUNT(*) FROM pet; $sql=mysql_query($result); $number_of_rows = mysql_fetch_rows($sql); while ($row=mysql_fetch_array($sql)){ $pet_name=$row['pet_name']; echo ..; } Craig Roberts Yury B . [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi

[PHP] Re: Count lines from php files

2002-12-12 Thread Jean-Christian Imbeault
Antti wrote: How can I count how many code lines I have written? I have many php files in one directory. I'm using linux.Do you know any non-php way to count the lines. from a directory one level above where all your files lie do this: (assuming all you files are in a directory called php)

[PHP] Re: Count in PHP

2002-09-09 Thread Jome
I am wanting to do a count in PHP. I want to be able to count the number of records from a given database and display this count on the page. Can this be done using PHP or is the sql thing? If you're using MySQL - I don't know if COUNT() is a part of SQL'92 - you can use SELECT COUNT(*) FROM

[PHP] Re: count errors

2002-08-30 Thread Richard Lynch
I have a function that resets the count of fields with certain values when called. 99.9 percent of the time it works fine. However occaisionally it wont update the database. Even after breaking the selects up it still fails sometimes. If anyone has an idea of why I would really appreciate hearing

[PHP] Re: count number of downloads

2002-07-11 Thread Richard Lynch
I have a php-script with which one can download a file with a specific format like this: header(Content-type: application/specific); header(Content-Disposition: attachment; filename=$name.sqrfld); echo (output funny stuff...); and i will count the number of downloads in a database. When i

[PHP] Re: Count()

2001-08-29 Thread Kevin P
I have counted some rows in MySQL and I need to know how to pull out the number of rows. SELECT COUNT(*) AS myCount FROM Products -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

Re: [PHP] Re: Count()

2001-08-29 Thread ERISEN, Mehmet Kamil
$sql = SELECT COUNT(*) AS myCount FROM Products; $result = mysql_query($sql); $count = mysql_result($result,0); --- Kevin P [EMAIL PROTECTED] wrote: I have counted some rows in MySQL and I need to know how to pull out the number of rows. SELECT COUNT(*) AS myCount FROM Products --