At 22:30 -0500 1/7/04, Asif Iqbal wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul DuBois wrote:
 At 21:35 -0500 1/7/04, Asif Iqbal wrote:
 >-----BEGIN PGP SIGNED MESSAGE-----
 >Hash: SHA1
 >
 >Paul DuBois wrote:
 >> At 20:39 -0500 1/7/04, Asif Iqbal wrote:
 >> >-----BEGIN PGP SIGNED MESSAGE-----
 >> >Hash: SHA1
 >> >
 >> >Hi All
 >> >

 I don't think that's going to work.  You need to have some mechanism
 that can properly escape data values in case they contain stuff like
 apostrophes.



Hi Paul


I am going to use perl to parse the log and then send it to the database as
another recommeded ( and probably better for my case ). However since I
need users to be able to query against the database for specific logs I
like to see use PHP for the web part. Therefore I am actually going
through your book, MySQL second edition, Chap 8 , PHP API. Now in here
you have the urls http://www.snake.net/ushl/index.php and
http://www.snake.net/gp/index.php (on page 488). But I can't access
those links. I get "The requested URL /ushl/index.php was not found on
this server" message. I can go to the main website though

www.snake.net is a real site, but for purposes of the book, it's intended that you install the ushl and gp scripts on your own site and substitute the appropriate URLs for those in the book. For example, if your site is www.example.com and you install the scripts in directories named asif/ushl and asif/gp, you would access them as:

http://www.example.com/asif/ushl/index.php
http://www.example.com/asif/gp/index.php


By the way, you may want to visit http://www.kitebird.com/mysql-cookbook and grab a copy of the "recipes" distribution. In its apache/httpdlog directory, you'll find a Perl script for reading Apache log entries and inserting them into a MySQL table. That's not quite the same as what you're doing, but the same principles of reading log entries, splitting them up into column values, and making sure the values are escaped properly still apply. So the httpdlog.pl script in that directory may be instructive.


-- Paul DuBois, MySQL Documentation Team Madison, Wisconsin, USA MySQL AB, www.mysql.com

MySQL Users Conference: April 14-16, 2004
http://www.mysql.com/uc2004/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to