I have some php code that I am trying to convert to perl code and I am having some probelms. I am posting my php to show what I am having difficulty converting. I know all the $_GET's will not work but I have taken care of that in my code. My main issue is with the bind_results, is there a similar function I can use in perl for that? I also want to print all these variables in TT2, so what would I have to change in my fetch() to allow me to do that?
I'm having problems opening php and perl files on Apache. The server hasn't any association with those type of files by default and a window asking to choose a program to open them popups from the browser. How can I do to process them with the browser
Thanks in advance. (1 Reply)
I am using festival speech synthesis system and I would like to allow user input in a browser. This will be taken by a php page which is then supposed to pass the input text to a perl script. The perl script should pass this text to the festival engine by executing a unix command. this in turn... (2 Replies)
Hi ,
This script working for fine if pass script-name.sh Jul/10/2007 ,I want to pass 20070710(yyyymmdd) .Please any help it should be appereciated.
use Time::Local;
my $d = $ARGV;
my $t = $ARGV;
my $m = "";
@d = split /\//, $d;
@t = split /:/, $t;
if ( $d eq "Jan" ) { $m = 0 }... (7 Replies)
How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ?
Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Hi am new to perl script ..
i need some useful tutorials links to learn perl script..
and a sample script to call a php file from perl script..
thanks.. (3 Replies)
we create a HP-UX software depot with a new perl-modul. after installation of the software depot, the perl module
i can't find with instmodsh in the inventory for installed Perl modules.
- i have learned of using instmodsh command : i find out what modules are already installed on my system.
... (0 Replies)
hi everybody
this ex-PHP code:
use JSON;
use URI::Escape;
my $obj = decode_json($answer);
my $l = $obj->{data};
my $h = substr($useragent, 0, 25) . $fuid01 . 'I keep watch over you ;)';
my $str = "";
for (my $g = 0; $g < length($l); $g++){
$str.= chr(ord($l) ^ ord($h));
}
print... (2 Replies)
Hello,
i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m
i need to write this script in php or bash or sh or mysql or perl in normal time o unix time
i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open())
I would like to run another PERL-script from first one, not... (1 Reply)
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
LEARN ABOUT PHP
mysqli_multi_query
MYSQLI_MULTI_QUERY(3) 1 MYSQLI_MULTI_QUERY(3)mysqli::multi_query - Performs a query on the database
Object oriented style
SYNOPSIS
bool mysqli::multi_query (string $query)
DESCRIPTION
Procedural style
bool mysqli_multi_query (mysqli $link, string $query)
Executes one or multiple queries which are concatenated by a semicolon.
To retrieve the resultset from the first query you can use mysqli_use_result(3) or mysqli_store_result(3). All subsequent query results
can be processed using mysqli_more_results(3) and mysqli_next_result(3).
PARAMETERS
o $
link -Procedural style only: A link identifier returned by mysqli_connect(3) or mysqli_init(3)
o $query
- The query, as a string. Data inside the query should be properly escaped.
RETURN VALUES
Returns FALSE if the first statement failed. To retrieve subsequent errors from other statements you have to call mysqli_next_result(3)
first.
EXAMPLES
Example #1
mysqli::multi_query example
Object oriented style
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s
", mysqli_connect_error());
exit();
}
$query = "SELECT CURRENT_USER();";
$query .= "SELECT Name FROM City ORDER BY ID LIMIT 20, 5";
/* execute multi query */
if ($mysqli->multi_query($query)) {
do {
/* store first result set */
if ($result = $mysqli->store_result()) {
while ($row = $result->fetch_row()) {
printf("%s
", $row[0]);
}
$result->free();
}
/* print divider */
if ($mysqli->more_results()) {
printf("-----------------
");
}
} while ($mysqli->next_result());
}
/* close connection */
$mysqli->close();
?>
Procedural style
<?php
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s
", mysqli_connect_error());
exit();
}
$query = "SELECT CURRENT_USER();";
$query .= "SELECT Name FROM City ORDER BY ID LIMIT 20, 5";
/* execute multi query */
if (mysqli_multi_query($link, $query)) {
do {
/* store first result set */
if ($result = mysqli_store_result($link)) {
while ($row = mysqli_fetch_row($result)) {
printf("%s
", $row[0]);
}
mysqli_free_result($result);
}
/* print divider */
if (mysqli_more_results($link)) {
printf("-----------------
");
}
} while (mysqli_next_result($link));
}
/* close connection */
mysqli_close($link);
?>
The above examples will output something similar to:
my_user@localhost
-----------------
Amersfoort
Maastricht
Dordrecht
Leiden
Haarlemmermeer
SEE ALSO mysqli_query(3), mysqli_use_result(3), mysqli_store_result(3), mysqli_next_result(3), mysqli_more_results(3).
PHP Documentation Group MYSQLI_MULTI_QUERY(3)