Location: PHPKode > scripts > mysql_db class > mysql_db-class/sample_logfile.txt
EXAMPLE LOG INFORMATION FROM A REAL WEB APPLICATION USING adv. mysql_db

----------------------  SAMPLE LOGFILE STARTS HERE -------------------------------------

13/01/2001 - 18:24:51 ===== SESSION STARTED BY /portada.php3 =====  
13/01/2001 - 17:24:51 - OPERATION O.K.: Executed SELECT * FROM tbl_active_sessions got 1 rows
13/01/2001 - 17:24:51 - OPERATION O.K.: Executed SELECT * FROM tbl_active_sessions,tbl_monedas 
  WHERE tbl_active_sessions.moneda=tbl_monedas.id AND sessionID = '3a60d2c0c545a' got 1 rows
13/01/2001 - 17:24:51 - OPERATION O.K.: Executed SELECT * FROM tbl_monedas order by moneda_e got 
  14 rows
13/01/2001 - 17:24:51 - OPERATION O.K.: Executed SELECT * FROM tbl_vinos where id=2 got 1 rows
13/01/2001 - 17:24:51 - OPERATION O.K.: Executed SELECT * FROM tbl_vinos where id=3 got 1 rows
13/01/2001 - 17:24:51 - OPERATION O.K.: Executed SELECT * FROM tbl_vinos where id=4 got 1 rows
13/01/2001 - 17:24:51 - OPERATION O.K.: Executed SELECT * FROM tbl_vinos where id=5 got 1 rows
13/01/2001 - 17:24:51 - OPERATION O.K.: Database vinost released
15/01/2001 - 05:48:35 ===== SESSION STARTED BY /portada.php3 =====
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed SELECT * FROM tbl_active_sessions got 1 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed DELETE FROM tbl_active_sessions WHERE sessionid 
  = '3a60d2c0c545a' affected 1 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed SELECT * FROM tbl_active_sessions,tbl_monedas 
  WHERE tbl_active_sessions.moneda=tbl_monedas.id AND sessionID = '3a5b4515224bf' got 0 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed INSERT INTO tbl_active_sessions 
  (sessionid,start,userid) VALUES ('3a5b4515224bf',979552115,'') affected 1 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed SELECT * FROM tbl_monedas order by moneda_e got 
  14 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed SELECT * FROM tbl_vinos where id=2 got 1 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed SELECT * FROM tbl_vinos where id=3 got 1 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed SELECT * FROM tbl_vinos where id=4 got 1 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Executed SELECT * FROM tbl_vinos where id=5 got 1 rows
15/01/2001 - 04:48:35 - OPERATION O.K.: Database vinost released
15/01/2001 - 05:48:48 ===== SESSION STARTED BY /vinos/fichavino.php3 =====
15/01/2001 - 04:48:48 - OPERATION O.K.: Executed SELECT * FROM tbl_active_sessions got 1 rows
15/01/2001 - 04:48:48 - OPERATION O.K.: Executed SELECT * FROM tbl_active_sessions,tbl_monedas 
  WHERE tbl_active_sessions.moneda=tbl_monedas.id AND sessionID = '3a5b4515224bf' got 1 rows
15/01/2001 - 04:48:48 - OPERATION O.K.: Executed SELECT * FROM tbl_monedas order by moneda_e got
  14 rows
15/01/2001 - 04:48:48 - OPERATION O.K.: Executed SELECT tbl_vinos.*,tbl_tipos.tipo_e,
  tbl_denorigen.nombre AS do,tbl_bodegas.nombre as bod,tbl_bodegas.localidad_e,tbl_bodegas.zona_e
  FROM tbl_denorigen,tbl_tipos,tbl_vinos LEFT JOIN tbl_bodegas ON tbl_vinos.bodega=tbl_bodegas.id 
  WHERE tbl_vinos.tipo=tbl_tipos.id and tbl_denorigen.id=tbl_vinos.denorigen and tbl_vinos.id=3 
  got 1 rows
15/01/2001 - 04:48:48 - OPERATION FAILED: Executed SELECT anyada from tbl_anyada where id= got 
  1064 You have an error in your SQL syntax near '' at line 1
15/01/2001 - 04:48:48 - OPERATION O.K.: Executed select tbl_composicion.varuva,
  tbl_variedades.nombre_e,tbl_composicion.cantidad from tbl_composicion,tbl_variedades where 
  tbl_variedades.id=tbl_composicion.varuva AND vinoid=3 order by cantidad desc got 4 rows
15/01/2001 - 04:48:48 - OPERATION O.K.: Executed SELECT capacidad_e from tbl_capacidades where 
  id=7 got 1 rows
15/01/2001 - 04:48:48 - OPERATION O.K.: Executed SELECT botella_e from tbl_botellas where id=15 
  got 1 rows
15/01/2001 - 04:48:49 - OPERATION O.K.: Database vinost released
15/01/2001 - 05:49:43 ===== SESSION STARTED BY /variedades/ficha_uva.php3 =====
15/01/2001 - 04:49:43 - OPERATION O.K.: Executed SELECT * FROM tbl_monedas order by moneda_e got 
  14 rows
15/01/2001 - 04:49:43 - OPERATION O.K.: Executed SELECT * FROM tbl_variedades WHERE id=47 got 1 
  rows
15/01/2001 - 04:49:43 - OPERATION O.K.: Database vinost released

----------------------  SAMPLE LOGFILE ENDS HERE -------------------------------------

[ logfile generated by http://www.vinostrum.com web-store ]

As you can see this is a heavy db driven website and logfile info is quite useful to find out 
where your SQL statements fail due to malformed syntax and give you (through log analysis) 
enough data to build i.e. a search engine most used words, the most viewed database info and so 

on

Each line in the logfile shows the moment of the log operation, the result of the operation, the 
command executed, the rows affected or number of rows retrieved and in case of error the error
number and error description (in the sample logfile lines are wraped for reading improvement)

For comodity and page-hit count initialization of mysql_conn->init() states an info line 
displaying ===== SESSION STARTED BY [name of the page starting the log] =====
and mysql_conn->destroy() function states a "Database [database name] released" info line

  Carlos Falo Hervás
  hide@address.com
  http://www.bisinteractive.net

  C/Manila 62-64 Esc. E Ent. 3ª
  08034 Barcelona Spain

  Phone: +34 9 3 2063652
  Fax:	 +34 9 3 2063689

Return current item: mysql_db class