10 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
Dear Expert,
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.
DECLARE
c PLS_INTEGER := dbms_sql.open_cursor;
flag VARCHAR2(50); ... (1 Reply)
Discussion started by: Alone
1 Replies
2. Shell Programming and Scripting
HOW CAN I SELECT AN UNIQUE STRING FROM A FIELD? ACTUALLY I WANT TO PRINT RECORDS THAT 2ND FIELD OF THAT HAVE ONE CHARACTER AND IT MUST BE "P"
AWK '$2~"" {PRINT $0}' IN > OUTBUT THIS CODE PRINT ALL RECORDS WHICH 2ND FIELDS OF THEM START WITH "P" AND MAY CONTAINS ANOTHER CHARACTER! (1 Reply)
Discussion started by: saeed.soltani
1 Replies
3. Shell Programming and Scripting
hi,
#cat /u01/file|grep -v "^#"|cut -f2 -d: -s
i want to avoid repeated lines from the output of the above command.
Do we have anyting like unique in shell scripting.
thx (4 Replies)
Discussion started by: bang_dba
4 Replies
4. Boot Loaders
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)
Discussion started by: rpf
0 Replies
5. Shell Programming and Scripting
Hi!
From a file the format of whichis as in the sample here below, I need to get two files having just 2 columns, being - for the first file - the 2nd than the 1st from the original file; and - for the second file - the LAST then the 1st column of the original file.
Moreover, I would sort the... (3 Replies)
Discussion started by: mjomba
3 Replies
6. Programming
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)
Discussion started by: Corona688
2 Replies
7. Shell Programming and Scripting
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)
Discussion started by: usha rao
15 Replies
8. UNIX for Advanced & Expert Users
I'm using select() to monitor multiple file descriptors (inet sockets) in application. But this application must also collaborate with other applications on the same host via shared memory (mmap'ed file) due to performance reasons. How can I become notification that mmaped memory is changed or... (1 Reply)
Discussion started by: Hitori
1 Replies
9. IP Networking
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)
Discussion started by: smanu
12 Replies
10. UNIX for Advanced & Expert Users
Hai Friends
I am writing a client-server application for backup utility. The computer is used only for backup utility. We have planed to place linux operating system in it. But i am confused with lots of falvour. I don't know really which flavour of linux to use. Can you please suggest me a... (2 Replies)
Discussion started by: collins
2 Replies
SQLITE_QUERY(3) SQLITE_QUERY(3)
sqlite_query - Executes a query against a given database and returns a result handle
SYNOPSIS
resource sqlite_query (resource $dbhandle, string $query, [int $result_type = SQLITE_BOTH], [string &$error_msg])
DESCRIPTION
resource sqlite_query (string $query, resource $dbhandle, [int $result_type = SQLITE_BOTH], [string &$error_msg])
Object oriented style (method): SQLiteResult SQLiteDatabase::query (string $query, [int $result_type = SQLITE_BOTH], [string
&$error_msg])
Executes an SQL statement given by the $query against a given database handle.
PARAMETERS
o $dbhandle
- The SQLite Database resource; returned from sqlite_open(3) when used procedurally. This parameter is not required when using the
object-oriented method.
o $query
- The query to be executed. Data inside the query should be properly escaped.
o $result_type
-The optional $result_type parameter accepts a constant and determines how the returned array will be indexed. Using SQLITE_ASSOC
will return only associative indices (named fields) while SQLITE_NUM will return only numerical indices (ordinal field numbers).
SQLITE_BOTH will return both associative and numerical indices. SQLITE_BOTH is the default for this function.
o $error_msg
- The specified variable will be filled if an error occurs. This is specially important because SQL syntax errors can't be fetched
using the sqlite_last_error(3) function.
Note
Two alternative syntaxes are supported for compatibility with other database extensions (such as MySQL). The preferred form is the
first, where the $dbhandle parameter is the first parameter to the function.
RETURN VALUES
This function will return a result handle or FALSE on failure. For queries that return rows, the result handle can then be used with func-
tions such as sqlite_fetch_array(3) and sqlite_seek(3).
Regardless of the query type, this function will return FALSE if the query failed.
sqlite_query(3) returns a buffered, seekable result handle. This is useful for reasonably small queries where you need to be able to ran-
domly access the rows. Buffered result handles will allocate memory to hold the entire result and will not return until it has been
fetched. If you only need sequential access to the data, it is recommended that you use the much higher performance
sqlite_unbuffered_query(3) instead.
CHANGELOG
+--------+---------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------+
| 5.1.0 | |
| | |
| | Added the $error_msg parameter |
| | |
+--------+---------------------------------+
NOTES
Warning
SQLite will execute multiple queries separated by semicolons, so you can use it to execute a batch of SQL that you have loaded from
a file or have embedded in a script. However, this works only when the result of the function is not used - if it is used, only the
first SQL statement would be executed. Function sqlite_exec(3) will always execute multiple SQL statements.
When executing multiple queries, the return value of this function will be FALSE if there was an error, but undefined otherwise (it
might be TRUE for success or it might return a result handle).
SEE ALSO
sqlite_unbuffered_query(3), sqlite_array_query(3).
PHP Documentation Group SQLITE_QUERY(3)