php-general Digest 21 Mar 2004 13:09:45 -0000 Issue 2659

Topics (messages 181060 through 181077):

Re: Inconv in PHP5 compile
        181060 by: PHPDiscuss - PHP Newsgroups and mailing lists

php and CSS level 2
        181061 by: Andy B
        181062 by: Aidan Lister
        181068 by: Ben Ramsey
        181069 by: Richard Davey
        181073 by: Ben Ramsey

Re: Function to check a valid date
        181063 by: Tom Reed

Re: ip to country
        181064 by: Tom Reed
        181066 by: Filip de Waard

Re: string function that inserts a char
        181065 by: Five

Re: Comparing values / Regex ?
        181067 by: Ben Ramsey

Forum notify
        181070 by: thies.thieso.net

Upload file field not working as a form element
        181071 by: Vernon
        181072 by: Ben Ramsey
        181076 by: Vernon

PHP 5 Free Hosting
        181074 by: David Costa

Re: CMS Templating with Standards Based HTML Delima...
        181075 by: Justin French

Timing a MySQL response
        181077 by: Richard Davey

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I'm having PHP5 compile problems as well. Here's some shortened output
from commands giving a picture of my problem.

The first thing that troubles me is vi giving this output:

[EMAIL PROTECTED] php-5.0.0RC1]# vi ext/mysql/php_mysql.c
"ext/mysql/php_mysql.c" 2514L, 70348C
Error detected while processing modelines:
line 2512:
E518: Unknown option: fdm=marker
Hit ENTER or type command to continue

I ran into this after:

[EMAIL PROTECTED] php-5.0.0RC1]# gcc --version
gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
..


[EMAIL PROTECTED] php-5.0.0RC1]# ./configure
--with-apsx2=/usr/local/apache2/bin/apxs --with-mysql=/data/sw/mysql-4.0.18
..


[EMAIL PROTECTED] php-5.0.0RC1]# make
..

..
gcc  -Iext/mysql/ -I/data/sw/php-5.0.0RC1/ext/mysql/ -DPHP_ATOM_INC
-I/data/sw/php-5.0.0RC1/include -I/data/sw/php-5.0.0RC1/main
-I/data/sw/php-5.0.0RC1 -I/data/sw/php-5.0.0RC1/Zend
-I/usr/include/libxml2 -I/data/sw/mysql-4.0.18/include 
-I/data/sw/php-5.0.0RC1/TSRM  -g -O2  -c
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c -o ext/mysql/php_mysql.o  &&
echo > ext/mysql/php_mysql.lo
In file included from /data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:59:
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.h:51:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:72:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:82:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:86:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:90:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:101:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:122:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:181:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:376:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c: In function
`php_mysql_do_connect':
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: syntax error at
'@' token
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: syntax error at
'@' token
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: `MYSQL_TCP_PORT'
undeclared (first use in this function)
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: (Each undeclared
identifier is reported only once
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: for each function
it appears in.)
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:485:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:502: error: syntax error at
'@' token
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:502: error: syntax error at
'@' token
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:639:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:666:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:674: warning: comparison
between pointer and integer
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:703:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:706: error: `handler'
undeclared (first use in this function)
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:715:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:718: warning: comparison
between pointer and integer
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:726:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:771:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:779: warning: comparison
between pointer and integer
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:1123:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:1259:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c: In function
`zif_mysql_result':
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:1779: warning: assignment from
incompatible pointer type
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c: In function
`php_mysql_fetch_hash':
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:1949: warning: assignment from
incompatible pointer type
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c: In function
`zif_mysql_fetch_lengths':
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:2135: warning: assignment from
incompatible pointer type
make: *** [ext/mysql/php_mysql.lo] Error 1

--- End Message ---
--- Begin Message ---
was just wondering if php will work inside a CSS level 2 style sheet?? for example:

<?php ?>
<style type="text/css">
<?php
if(!empty($name)){ ?>
input#name {
display: none }
<?php } else { ?>
input#name {
font-family: Arial, serif;
font-size: 12pt;
color: blue;
background-color: transparent;
..... }
<?php } ?

/*rest of style sheet */
</style>

if this will work i was wondering 2 things:

1. how would i have to set it up to work right with the style sheet with php in it to 
work as a seperate file from the html file
and
2. how would i set the style sheet up to work inside the original html/php file that 
contained the original html code...




--- End Message ---
--- Begin Message ---
Your question indicates you have very little understanding of what PHP
actually is.

PHP will be parsed anywhere in any script, as long as your webserver is set
to parse that type of file (ie, .php by default).

1. In your webserver config you need to make .css files parsed by php
2. Like you've done in your code snip?

I suggest you a) read the manual b) experiment before asking further
questions.



"Andy B" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
was just wondering if php will work inside a CSS level 2 style sheet?? for
example:

<?php ?>
<style type="text/css">
<?php
if(!empty($name)){ ?>
input#name {
display: none }
<?php } else { ?>
input#name {
font-family: Arial, serif;
font-size: 12pt;
color: blue;
background-color: transparent;
..... }
<?php } ?

/*rest of style sheet */
</style>

if this will work i was wondering 2 things:

1. how would i have to set it up to work right with the style sheet with php
in it to work as a seperate file from the html file
and
2. how would i set the style sheet up to work inside the original html/php
file that contained the original html code...





--- End Message ---
--- Begin Message --- Why not just make your CSS script end with the .php extension instead of .css? Then, the server will automatically parse it (most likely it will--depending on your server setup, of course). You can link to it from your HTML page like you would your CSS:

<style type="text/css">
<!--
@import url("/path/to/css.php");
-->
</style>

or

<link href="/path/to/css.php" rel="stylesheet" type="text/css" />



Aidan Lister wrote:

Your question indicates you have very little understanding of what PHP
actually is.

PHP will be parsed anywhere in any script, as long as your webserver is set
to parse that type of file (ie, .php by default).

1. In your webserver config you need to make .css files parsed by php
2. Like you've done in your code snip?

I suggest you a) read the manual b) experiment before asking further
questions.



"Andy B" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
was just wondering if php will work inside a CSS level 2 style sheet?? for
example:

<?php ?>
<style type="text/css">
<?php
if(!empty($name)){ ?>
input#name {
display: none }
<?php } else { ?>
input#name {
font-family: Arial, serif;
font-size: 12pt;
color: blue;
background-color: transparent;
..... }
<?php } ?

/*rest of style sheet */
</style>

if this will work i was wondering 2 things:

1. how would i have to set it up to work right with the style sheet with php
in it to work as a seperate file from the html file
and
2. how would i set the style sheet up to work inside the original html/php
file that contained the original html code...





-- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey

--- End Message ---
--- Begin Message ---
Hello Ben,

Sunday, March 21, 2004, 4:02:40 AM, you wrote:

BR> <style type="text/css">
BR> <!--
BR> @import url("/path/to/css.php");
-->>
BR> </style>

BR> or

BR> <link href="/path/to/css.php" rel="stylesheet" type="text/css" />

Just out of interest Ben, I do wonder if either of the above methods
would force the browser to never cache the CSS file locally, forcing
it to download it every single time? I can think of instances when
this would be a desirable result, but they are far and few between :)

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

--- End Message ---
--- Begin Message ---
RD> I do wonder if either of the above methods would force the
RD> browser to never cache the CSS file locally

You know, I didn't think about that, as I've never personally used this method. I've never had a need. Thinking about it now, I would also think that you may need to send a content-type header of "text/css" to the browser, as well, though I'm not positive on this.

OT --> Consequently, I've had a lot of trouble with IE caching any CSS file for a site I'm working on. Works perfectly in Mozilla, but IE has all sorts of bugs. It's loading the page before the CSS every time, so you get this flash of unformatted data. The client and most of their site users use IE, so I have to make it work. My boss found an odd work-around, though. If you put "<script type="text/javascript"> </script>" at the very top, just inside the <head> tag, then it will work just fine and load in the CSS first every time. I don't know the logic behind it, but, if it's IE, does there have to be any logic? ;-)

--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey

--- End Message ---
--- Begin Message ---
Try this:
http://us4.php.net/checkdate

-Tom Reed
[EMAIL PROTECTED]

"Chris Bruce" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello all,

I was going to build a function to check whether a selected date
exists, but thought that I would see if anyone has done this type of
thing already which would indeed save me some time.

I have a form where the users select the day of the week, month, date
and year from 4 pulldowns. (Saturday, March 20, 2004). I need to have a
function that will check to see if that is indeed a real date.

Does this sound familiar to anyone?

Thanks a bunch :)

--

Chris Bruce
[EMAIL PROTECTED]

Idextrus
E-Business Architects
http://www.idextrus.com
3282 Wilmar Cres.
Mississauga, ON
L5L4B2
CA
905.828.9189

****************************************************************
This e-mail and its contents are privileged, confidential and
subject to copyright. If you are not the intended recipient,
please delete this e-mail immediately. Any unauthorized use
or disclosure of the information herein is prohibited.

--- End Message ---
--- Begin Message ---
I would think using HTTP_ACCEPT_LANGUAGE to get the users browser
language/country info would be quicker and easier to implement.

Example:

$string = getenv('HTTP_ACCEPT_LANGUAGE');
list($language, $country) = split('[-,]', $string);

-Tom Reed
[EMAIL PROTECTED]


"Enda Nagle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a site that will have different pricing by world region / country
and
> also offer different currencies.
>
> Presently, the user has to select their country from a select menu and
> submit the form, but I would like to eliminate this step if possible, and
> set the country according to their IP address.
>
> I had a quick look at http://www.iptocountry.com but was wondering if
there
> was a way of doing this with PHP functions?
>
> I know its in use on the php.net and google.com sites (when I go to either
I
> get ie.php.net or google.ie) so was wondering if its costly / easy to
> implement?
>
> Thanks for the help,
>
> Enda
> --
>
>
> Enda Nagle
> +353 86 168 0774
> [EMAIL PROTECTED]
> www.nightsol.net

--- End Message ---
--- Begin Message --- On Mar 21, 2004, at 3:27 AM, Tom Reed wrote:
I would think using HTTP_ACCEPT_LANGUAGE to get the users browser
language/country info would be quicker and easier to implement.

Using HTTP headers to identify the country where a visitor comes from is totally inaccurate. My browser identifies itself with: Accept-Language: en-us,en;q=0.5, while I live in the Netherlands where the main language is Dutch.


When you need a little bit of accuracy you can't avoid using an IP to country database.

Regards,

Filip de Waard
--- End Message ---
--- Begin Message ---
"Jason Giangrande" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Five wrote:
> > "Five" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> >
> >>I just finished looking through string functions
> >>http://us2.php.net/manual/en/ref.strings.php
> >>and can't find one that inserts a character, not replaces one.
> >>
> >>If there's a string that's over 50 chars long without a space, I want to insert a 
> >>space without replacing or losing any of the
> >>original characters. Is there a function to do that?
> >>
> >>advance thanks,
> >>Dale
> >
> >
> > I should add that, unless there's a function that does it all, I'm not really 
> > concerned with the finding the 50th char part. I
know
> > there's other funcs for that kind of thing. It's just that all I'm trying to do is 
> > make sure that when the string is output, it
will
> > wrap to the width of a table and not stretch the table width to suit it's fancy.
> > If I manufacture a function to do all of the little things necessary to make this 
> > thing wrap, it seems like a lot of ugly code
to do
> > a simple task.
> >
>
> Use substr_replace() and set the length value to 0.  Here's an example:
>
> $text = "Thistext";
> echo "$text<br />";
> $text = substr_replace($text, " ", 4, 0);
> echo $text;
>
> Test it and you will see that a space is added into the text without
> replacing any of it.
>
> -- 
> Jason Giangrande <[EMAIL PROTECTED]>
> http://www.giangrande.org
> http://www.dogsiview.com


Thanks Jason

--- End Message ---
--- Begin Message --- Please reply to the list so that everyone may benefit from your questions.

> --- Ben Ramsey <[EMAIL PROTECTED]> wrote:
>
>>Here's my take on it.  Pull all your values into one
>>long string:
>
> (cut)
>
>>if (($timestamp = strtotime($date_string)) === -1) {
>>     // Not a valid date; do some error reporting
>>here
>>} else {
>>     // It is a valid date, $timestamp is now a
>>valid Unix
>>     // timestamp of $date_string; use it like
>>below:
>>     echo date("m/d/Y", $timestamp);
>>}
>
Is that an error - Or propper PHP code ?

Ive seen $a == 34 etc - with TWO equals signs. - But
havnt seen it with 3 before.

Yes, it's proper code. See the manual for more details. http://www.php.net/manual/en/language.operators.comparison.php

- Has PHP got 'regex' capability - & comparing text
case IN-sensitivly ?? IE "Cat" equals "CaT" equals
"cat" equals "CAT"..

Also "Cat in the hat" is TRUE - if I 'regex' & want to
see if 'Cat' is in the string (case in-sensitive)...

Indeed. PHP does have regex capability. You should take a good look at the manual. It will answer all of your questions.


Perl-compatible regular expressions: http://www.php.net/pcre
POSIX Extended regular expressions: http://www.php.net/regex

I would suggest using PCRE. There is a increased speed performance difference, I believe. You can perform case insensitive and case sensitive searches with PCRE. Just read the manual, and ask here if you have any questions with code after that.

Also, note that ("cat" == "cat") but ("Cat" != "CaT"). However, I wouldn't do a string comparison like that, though PHP is definately capable of it. I would use strcmp() or strcasecmp(), the latter of which is case insensitive. Check the manual for their usage, and note that they return zero (0) on true.

--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey

--- End Message ---
--- Begin Message ---

<<attachment: ehvonrnyqw.bmp>>


--- End Message ---
--- Begin Message ---
As much as I try I cannot get a file field in a form inserted into a MySQL
record. I've even tried to get it to echo to the page when the page is
submitted to itself and it's not reading the field.

What am I missing here?

--- End Message ---
--- Begin Message --- Could you post both your HTML form code and the PHP code you're using to handle the file upload. Also, just to make sure I understand what you're trying to do, you want to insert the uploaded file into a MySQL database?

Vernon wrote:
As much as I try I cannot get a file field in a form inserted into a MySQL
record. I've even tried to get it to echo to the page when the page is
submitted to itself and it's not reading the field.

What am I missing here?

-- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/People/BenRamsey

--- End Message ---
--- Begin Message ---
All I am trying to do is insert the file name, not the file. The file is
being uploaded to the server in a specific location. All I need is the
filename inserted into the database. I've gotten the upload part to work and
everything I just can't get the file name inserted for God knows what
reason. I removed the upload code and am simply trying to insert the
filename and userid into the database. The userid goes in but I cannot get
the file name inserted.

Here is the form:
     <form action="<?php echo $editFormAction; ?>" method="post"
enctype="multipart/form-data" name="form1">
                    <input name="filename" type="file" id="filename">
                    <input name="userid" type="hidden" id="userid"
value="<?php echo $row_rsUSER['id']; ?>">
                    <input type="submit" name="Submit2" value="Upload"
disabled>
                    <input type="hidden" name="MM_insert" value="form1">
      </form>

and here is the php code

<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "",
$theNotDefinedValue = "")
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" :
"NULL";
      break;
    case "date":
   $theValue = ($theValue != "") ? "'" . date("Y-m-d",strtotime($theValue))
. "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue :
$theNotDefinedValue;
      break;
  }
  return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
  $insertSQL = sprintf("INSERT INTO photos (id, photo) VALUES (%s, %s)",
                       GetSQLValueString($_POST['userid'], "int"),
                       GetSQLValueString($_POST['userid2'], "text"));

  mysql_select_db($database_connSPARTY, $connSPARTY);
  $Result1 = mysql_query($insertSQL, $connSPARTY) or die(mysql_error());

  $insertGoTo = "complete.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}

--- End Message ---
--- Begin Message --- Hello!
We are offering totally free PHP 5 Hosting packages at http://dotgeek.org
There is no extra plan to buy or anything else.


This could be a very good opportunity for developers interested in testing their script and code
under PHP 5.


On our site you can see the phpinfo page and some further information.

Best Regards

David Costa
--- End Message ---
--- Begin Message --- Adam,

The current crop of browser based WYSIWYG editors are far from cross browser and standards compliant, so steer clear.

You could consider looking into Macromedia Contribute, which is perfect for little client touch-ups in a WYSIWYG, non-technical environment.

If you want your own CMS, and want standards, and templating, and the 400 other things that are on your list, you need to consider writing your own solution.

However, I will also point you to a couple of existing solutions which may either inspire you, or prove to be "enough of a solution" for your situation...

1. MovableType (MT) [1] is behind 90% of the blogs out there, and since blogs are behind over 90% of all standards based websites right now, it's at least *conducive* to a standards-based workflow. It's *supposed* to be blogging software, but it's being bent to handle all sorts of website content... Doug Bowman [2] uses it to power his blog, his portfolio, and used it as the CMS for adaptive path's [3] entire site (give or take a few bits) -- he has an excellent explanation of it all too [4].

The cool thing about MT is that there's truckloads of plug-ins, which provide real power. A plug-in I recently read about by John Gruber [5] is Markdown [6], a way to convert email-style plain text into valid XHTML. See the link for more details. John also wrote Smartypants, which makes HTML "better".

However, I'm getting a little OT, since MT is Perl Based, but there's a huge community, and you might be able to bend MT to suit your needs.


2. Textile [7] is like Markdown, in that it parses email-style raw text with simple formatting (*bold*) and shorthand to produce valid XHTML... it's written in PHP, and has been embedded into Textpattern [8], a wonderful new PHP-driven CMS which is in Gamma testing at the moment. Textpattern fully supports and *embraces* standards, XHTML, CSS, et al, and is quite possible the best --and most elegant-- CMS on the market. Whilst it hasn't got everything *I'd* want in a CMS (hence why I'm building my own), it's truly amazing.


It *can* be used for blogs, and has many blog-like features, but Textpattern can be used for all sorts of web publishing.

However, it takes over your whole site.. it's all inclusive -- CMS, Users & Admin, CSS, Templating, XHTML, etc... EVERYTHING!


At the very least, Textile might inspire you to write something like it or Markdown, empowering your clients to make small and large changes using nothing but a plain text area and a few simple special characters to change formatting slightly.



The links:


1. http://www.movabletype.org/
2. http://www.stopdesign.com/
3. http://www.adaptivepath.com/
4. http://www.stopdesign.com/log/2003/07/11/adaptive_paths_mt_setup.html
5. http://daringfireball.net/
6. http://daringfireball.net/projects/markdown/
7. http://www.textism.com/tools/textile/
8. http://www.textpattern.com/



On Sunday, March 21, 2004, at 10:01 AM, Adam Reiswig wrote:

Is there a good open source php based cms system out there that can do the above? I'd sure like to know about it. Thanks for any pointers!

--- Justin French http://indent.com.au

--- End Message ---
--- Begin Message ---
Hi all,

Just a quick question - but does anyone know how to get the ms value
back from MySQL that tells you how long it took to run your query?

It shows it when using the command-line version, or MySQL Front, but
I'm yet to figure out how to actually retrieve the value (if it is at
all possible?).

I guess I could wrap a simple timer function before and after the
query, but as MySQL seems to have this value already I'd rather not if
I don't have to. Suggestions welcome!

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

--- End Message ---

Reply via email to