I have an table name (SMS) in which two column are there one "Flag" other is "Message", If my flag column consist of status "1" then output should be "welcome", else" try again" ,. please correct my code.
Hi,
Off late I had been looking at the differences b/w select() & poll() system calls. The requirement is to reduce the overhead, processor power in waiting for the data. In the kind of connections under consideration there would be very frequent data arriving on the sockets, so poll() fares... (12 Replies)
We are using the line #!/usr/bin/ksh in the script, to run the script in ksh. If I have Bash shell and Ksh, how to select the shell to run the script during runtime?
Thanks in advace
Victor (2 Replies)
Please provide the solution for the following scenario:
1) There are two process named as ProcessA and ProcessB
2) ProcessA has opend a named pipe in read mode.This has been made as blocking mode.
3) ProcessB opens this pipe and writes in Blocking mode.So wat happens is even if Process A goes... (2 Replies)
I've a file like this:
andrea andre@lol.com october
antonio@lol.com
marco 45247@pop.com
kk@pop.com may
pollo@lol.com
mary mary@lol.com
can I select only the column with email adress?
can I utilise a filter with @ ?
I want obtain this:
... (2 Replies)
Hi I have i doubt, actually i have to select everything before a word(pattern).For that i am using sed
i am using the below line of code but it is not working i am getting a blank instead..
sed -n '/regexp/{g;1!p;};h' file1
Can anyone help?
Thanks (15 Replies)
Is select only supposed to report state changes on an FD's, state, whether or not it had pending input available in the first place? I've got a situation where select() repeatedly reports no FD's ready for stdin when there's lots of data available. And if it only reports changes, how is this... (2 Replies)
Hello,
I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error
" reboot and select proper Boot device or insert Boot media in select Boot device and press a key "
I have tried CD and... (0 Replies)
I have created two sockets and binded both. My requirement is that 2nd socket must send/ recv data only on expiration of timeval(tv). but the 1st socket must keep on send/recv the data without waiting for the 2nd socket completion......
I have posted my code below......
In this code the 2nd... (3 Replies)
Hi
I'm using the "select" command in the global_env.sh to log in to the application directory. This file is called in .bashrc profile.
Sample code:
Filename: global_env.sh
set -o vi
export severname=$(uname -n)
printf '%s\n%30s\n%s\n' "***********************" "Welcome to $severname"... (6 Replies)
Discussion started by: cheers799
6 Replies
LEARN ABOUT PHP
oci_fetch_object
OCI_FETCH_OBJECT(3)OCI_FETCH_OBJECT(3)oci_fetch_object - Returns the next row from a query as an objectSYNOPSIS
object oci_fetch_object (resource $statement)
DESCRIPTION
Returns an object containing the next result-set row of a query. Each attribute of the object corresponds to a column of the row. This
function is typically called in a loop until it returns FALSE, indicating no more rows exist.
For details on the data type mapping performed by the OCI8 extension, see the datatypes supported by the driver
PARAMETERS
o $statement
-A valid OCI8 statement identifier created by oci_parse(3) and executed by oci_execute(3), or a REF CURSOR statement identifier.
RETURN VALUES
Returns an object. Each attribute of the object corresponds to a column of the row. If there are no more rows in the $statement then FALSE
is returned.
Any LOB columns are returned as LOB descriptors.
DATE columns are returned as strings formatted to the current date format. The default format can be changed with Oracle environment vari-
ables such as NLS_LANG or by a previously executed ALTER SESSION SET NLS_DATE_FORMAT command.
Oracle's default, non-case sensitive column names will have uppercase attribute names. Case-sensitive column names will have attribute
names using the exact column case. Use var_dump(3) on the result object to verify the appropriate case for attribute access.
Attribute values will be NULL for any NULL data fields.
EXAMPLES
Example #1
oci_fetch_object(3) example
<?php
/*
Before running, create the table:
CREATE TABLE mytab (id NUMBER, description VARCHAR2(30));
INSERT INTO mytab (id, description) values (1, 'Fish and Chips');
COMMIT;
*/
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stid = oci_parse($conn, 'SELECT id, description FROM mytab');
oci_execute($stid);
while (($row = oci_fetch_object($stid)) != false) {
// Use upper case attribute names for each standard Oracle column
echo $row->ID . "<br>
";
echo $row->DESCRIPTION . "<br>
";
}
// Output is:
// 1
// Fish and Chips
oci_free_statement($stid);
oci_close($conn);
?>
Example #2
oci_fetch_object(3) with case sensitive column names
<?php
/*
Before running, create the table with a case sensitive column name:
CREATE TABLE mytab (id NUMBER, "MyDescription" VARCHAR2(30));
INSERT INTO mytab (id, "MyDescription") values (1, 'Iced Coffee');
COMMIT;
*/
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stid = oci_parse($conn, 'SELECT id, "MyDescription" FROM mytab');
oci_execute($stid);
while (($row = oci_fetch_object($stid)) != false) {
// Use upper case attribute names for each standard Oracle column
echo $row->ID . "<br>
";
// Use the exact case for the case sensitive column name
echo $row->MyDescription . "<br>
";
}
// Output is:
// 1
// Iced Coffee
oci_free_statement($stid);
oci_close($conn);
?>
Example #3
oci_fetch_object(3) with LOBs
<?php
/*
Before running, create the table:
CREATE TABLE mytab (id NUMBER, description CLOB);
INSERT INTO mytab (id, description) values (1, 'A very long string');
COMMIT;
*/
$conn = oci_connect('hr', 'welcome', 'localhost/XE');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
$stid = oci_parse($conn, 'SELECT id, description FROM mytab');
oci_execute($stid);
while (($row = oci_fetch_object($stid)) != false) {
echo $row->ID . "<br>
";
// The following will output the first 11 bytes from DESCRIPTION
echo $row->DESCRIPTION->read(11) . "<br>
";
}
// Output is:
// 1
// A very long
oci_free_statement($stid);
oci_close($conn);
?>
SEE ALSO oci_fetch(3), oci_fetch_all(3), oci_fetch_assoc(3), oci_fetch_array(3), oci_fetch_row(3).
PHP Documentation Group OCI_FETCH_OBJECT(3)