Sponsored Content
Full Discussion: Perl CGI.pm
Top Forums Shell Programming and Scripting Perl CGI.pm Post 10602 by tonyt on Saturday 17th of November 2001 12:57:21 AM
Old 11-17-2001
Quote:
Originally posted by PxT
I think your "if" statement should be something like:

if $query->param('action') eq "detail"
...
Sorry, misspelling. It IS
if $query->param('action') eq 'detail'
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Learning CGI using Perl

hi everyone, i am learning CGI using Perl, but i am having problem to compile and run the scripts. the thing is that, when i want to compile my scripts i have to get connected to the internet and have to upload the scripts to a server and then only i can compile and run my scripts. so, can... (2 Replies)
Discussion started by: shifan
2 Replies

2. Shell Programming and Scripting

checkbox_group => CGI, Perl

Hi, In my cgi script(written in Perl using cgi.pm) i have a checkbox and i want all the items to be checked. Here is what i use: checkbox_group(-name=>'studenten_in_groep', -values=>\@member_keys, -defaults=>\@member_keys, -labels=>\%temp_members, -columns=>2), But no boxes are checked...... (18 Replies)
Discussion started by: tine
18 Replies

3. Shell Programming and Scripting

Perl CGI Query

Hi All, This is quite a high level question so I appologise as if it sounds a bit woolly! I'm running a script via apache's cgi-bin that calls another Perl script (from a browser): http://192.168.000.000/cgi-bin/run_script.pl?SCRIPT=test.pl&text=RANDOM+TEXT&INPUT1=444444444444 This... (4 Replies)
Discussion started by: pondlife
4 Replies

4. Web Development

problem with exporting vairable from one perl cgi to another perl cgi script while redirecting.

Can anyone tell me how to export a variable from one perl CGI script to another perl cgi script when using a redirect. Upon running the login.pl the user is prompted to enter user name and password. Upon entering the correct credentials (admin/admin) the user is redirected to welcome page. My... (3 Replies)
Discussion started by: Arun_Linux
3 Replies

5. Shell Programming and Scripting

CGI in Perl

Hi, Am unfamiliar with using CGI modules in Perl. Though i checked in few sites about CGI , i dint get a clear idea. Can anyone please explain me the purpose of these statements, it ll be very helpful to me #!/usr/bin/perl use CGI qw/:standard/; use Storable; use Data::Dumper; my... (1 Reply)
Discussion started by: irudayaraj
1 Replies

6. Shell Programming and Scripting

Perl cgi pages out of cgi-bin folder in WINDOWS

Hi team, I have a typical problem with cgi pages in apache webserver in WINDOWS I am able to execute(display) the pages that are saved in cgi-bin folder. But I am not able to execute the pages stored in htdocs or other folder other than cgi-bin folder. Could anyone please let me know how... (1 Reply)
Discussion started by: scriptscript
1 Replies

7. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

8. Shell Programming and Scripting

CGI Perl : while loop in CGI perl

Hi Team, I am trying to connect to database(succeeded ) and print the records on the browser using while loop. But the elements of array are not displayed instead while loop is displayed directly. Instead of the below I can embed html statements in print but I am looking for the below style as I... (1 Reply)
Discussion started by: scriptscript
1 Replies

9. OS X (Apple)

Perl CGI

I am trying to get my MacBook Pro with 10.8 Mt Lion set up to run Perl CGI scripts. Having a problem. I can start Apache Web Server with no problems. Why do I put the static and dynamic scripts? I which directory? I have looked at this article:... (3 Replies)
Discussion started by: djehresmann
3 Replies

10. UNIX for Dummies Questions & Answers

PERL-CGI learning

Hello All, I am actually learning PERL and more interested to learn CGI script too. Can any suggest a forum or weblink which is more helpful for a dummy CGI developer. Thanks (6 Replies)
Discussion started by: posix
6 Replies
MYSQLND_QC_GET_NORMALIZED_QUERY_TRACE_LOG(3)				 1			      MYSQLND_QC_GET_NORMALIZED_QUERY_TRACE_LOG(3)

mysqlnd_qc_get_normalized_query_trace_log - Returns a normalized query trace log for each query inspected by the query cache

SYNOPSIS
array mysqlnd_qc_get_normalized_query_trace_log (void ) DESCRIPTION
Returns a normalized query trace log for each query inspected by the query cache. The collection of the trace log is disabled by default. To collect the trace log you have to set the PHP configuration directive mysqlnd_qc.collect_normalized_query_trace to 1 Entries in the trace log are grouped by the normalized query statement. The normalized query statement is the query statement with all statement parameter values being replaced with a question mark. For example, the two statements SELECT id FROM test WHERE id = 1 and SELECT id FROM test WHERE id = 2 are normalized as SELECT id FROM test WHERE id = ?. Whenever a statement is inspected by the query cache which matches the normalized statement pattern, its statistics are grouped by the normalized statement string. PARAMETERS
This function has no parameters. RETURN VALUES
An array of query log. Every list entry contains the normalized query stringand further detail information. +---------------------+---------------------------------------------------+ | Key | | | | | | | Description | | | | +---------------------+---------------------------------------------------+ | | | | query | | | | | | | Normalized statement string. | | | | | | | | occurences | | | | | | | How many statements have matched the normalized | | | statement string in addition to the one which has | | | created the log entry. The value is zero if a | | | statement has been normalized, its normalized | | | representation has been added to the log but no | | | further queries inspected by PECL/mysqlnd_qc have | | | the same normalized statement string. | | | | | | | |eligible_for_caching | | | | | | | Whether the statement could be cached. An state- | | | ment eligible for caching has not necessarily | | | been cached. It not possible to tell for sure if | | | or how many cached statement have contributed to | | | the aggregated normalized statement log entry. | | | However, comparing the minimum and average run | | | time one can make an educated guess. | | | | | | | | avg_run_time | | | | | | | The average run time of all queries contributing | | | to the query log entry. The run time is the time | | | between sending the query statement to MySQL and | | | receiving an answer from MySQL. | | | | | | | | avg_store_time | | | | | | | The average store time of all queries contribut- | | | ing to the query log entry. The store time is the | | | time needed to fetch a statements result set from | | | the server to the client and, storing it on the | | | client. | | | | | | | | min_run_time | | | | | | | The minimum run time of all queries contributing | | | to the query log entry. | | | | | | | | min_store_time | | | | | | | The minimum store time of all queries contribut- | | | ing to the query log entry. | | | | | | | | max_run_time | | | | | | | The maximum run time of all queries contributing | | | to the query log entry. | | | | | | | | max_store_time | | | | | | | The maximum store time of all queries contribut- | | | ing to the query log entry. | | | | +---------------------+---------------------------------------------------+ EXAMPLES
Example #1 mysqlnd_qc_get_normalized_query_trace_log(3) example mysqlnd_qc.collect_normalized_query_trace=1 <?php /* Connect, create and populate test table */ $mysqli = new mysqli("host", "user", "password", "schema", "port", "socket"); $mysqli->query("DROP TABLE IF EXISTS test"); $mysqli->query("CREATE TABLE test(id INT)"); $mysqli->query("INSERT INTO test(id) VALUES(1), (2)"); /* not cached */ $res = $mysqli->query("SELECT id FROM test WHERE id = 1"); var_dump($res->fetch_assoc()); $res->free(); /* cache put */ $res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT id FROM test WHERE id = 2"); var_dump($res->fetch_assoc()); $res->free(); /* cache hit */ $res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT id FROM test WHERE id = 2"); var_dump($res->fetch_assoc()); $res->free(); var_dump(mysqlnd_qc_get_normalized_query_trace_log()); ?> The above examples will output: array(1) { ["id"]=> string(1) "1" } array(1) { ["id"]=> string(1) "2" } array(1) { ["id"]=> string(1) "2" } array(4) { [0]=> array(9) { ["query"]=> string(25) "DROP TABLE IF EXISTS test" ["occurences"]=> int(0) ["eligible_for_caching"]=> bool(false) ["avg_run_time"]=> int(0) ["min_run_time"]=> int(0) ["max_run_time"]=> int(0) ["avg_store_time"]=> int(0) ["min_store_time"]=> int(0) ["max_store_time"]=> int(0) } [1]=> array(9) { ["query"]=> string(27) "CREATE TABLE test (id INT )" ["occurences"]=> int(0) ["eligible_for_caching"]=> bool(false) ["avg_run_time"]=> int(0) ["min_run_time"]=> int(0) ["max_run_time"]=> int(0) ["avg_store_time"]=> int(0) ["min_store_time"]=> int(0) ["max_store_time"]=> int(0) } [2]=> array(9) { ["query"]=> string(40) "INSERT INTO test (id ) VALUES (? ), (? )" ["occurences"]=> int(0) ["eligible_for_caching"]=> bool(false) ["avg_run_time"]=> int(0) ["min_run_time"]=> int(0) ["max_run_time"]=> int(0) ["avg_store_time"]=> int(0) ["min_store_time"]=> int(0) ["max_store_time"]=> int(0) } [3]=> array(9) { ["query"]=> string(31) "SELECT id FROM test WHERE id =?" ["occurences"]=> int(2) ["eligible_for_caching"]=> bool(true) ["avg_run_time"]=> int(159) ["min_run_time"]=> int(12) ["max_run_time"]=> int(307) ["avg_store_time"]=> int(10) ["min_store_time"]=> int(8) ["max_store_time"]=> int(13) } } SEE ALSO
Runtime configuration, mysqlnd_qc.collect_normalized_query_trace, mysqlnd_qc.time_statistics, mysqlnd_qc_get_query_trace_log(3). PHP Documentation Group MYSQLND_QC_GET_NORMALIZED_QUERY_TRACE_LOG(3)
All times are GMT -4. The time now is 02:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy