where is the input variable in the above line..? if the input line is stored in a variable called $line how to use it in the above statement... and also i want the output to be stored in another variable say $modified...
and also how to compare variables with case insensitive as i asked previously..?
Assume the input file is called "table2.sql".
Code:
sed -n 's/AUTO_INCREMENT[,]\?$//pI' < table2.sql > output.txt
It saves the output into a temp file called "output.txt". Then read it line by line with shell script and do your job in the loop.
Code:
while read line; do
#Do something here
done < output.txt
This User Gave Thanks to MacMonster For This Post:
I have a file that lists data about a system. It has a part that can look like:
the errors I'm looking for with other errors:
Alerts
Password Incorrect
Login Error
Another Error
Another Error 2
Other Info
or, just the errors I need to parse for:
Alerts
Password Incorrect
... (9 Replies)
Hi,
I have a file few hundred MB's with text like one below in single line.
20091117 abc xyg 20091117 def ghi 20091118 ppp ttt 20091118 zzz zzz xxx
I need to extract part of line from 1st occurence of pattern 20091117
till first occurence of another pattern 20091118.
I tried... (3 Replies)
Hi,
I have data which is having '|' as delimiter and have lobfilename/locations in the data.
Ex:
1200|name1|lobfilename.0.600|abcd
1201|name2|lobfilename.600.1300|abcd
My requirement is to print part of the line till the lobfilename and write to a different file and also print the... (4 Replies)
Hi all,
FileOne
family balance >>>>>
0 0
0 0
java.io.FileNotFoundException: Settings.xml (No such file or directory)
at java.io.FileInputStream.open(Native Method)
..
....
.....
.....
java.lang.NullPointerException
...
.....
......
Stacktrace:
at... (2 Replies)
Hello Experts,
Can you please help me by providing a code which can give me the complete path except last word in a variable, the variable i can use anywhere else for my operation
eg:
if this below one is my path:
... (3 Replies)
Hello All,
I have a text file with contents as below:
contents of error.txt:
message1="Reason for error code1"
message2="Reason for error code2"
message3="Reason for error code3.
To solve this, you may try doing restart"
I have a requirement where in I have to... (4 Replies)
Hello,
When i run this command
find ./ -type f -print | xargs grep -l 'myWord'
it prints the file name where 'myWord' exists and also something like the below which i want to exclude
grep: can't open Fields
grep: can't open Search
I tried piping and grep -v 'open' but it did not work.
... (3 Replies)
I have the code
message={TP=2012:09:23:00:00:00:GMT,SD=2012:09:23:00:00:00:GMT,SP=2,FT=CCGT,FG=3605}
I want to extract the FG=3605 parts of this. Please help. I am trying to do this using awk or unix. (5 Replies)
Hi,
I need help with following. I need to exclude words that match following patterns
a. more than length 4 (example SBRAP)
b. contains mixture uppercase and lower case regardless of the length (example GSpD)
File contains
COFpC
MCHX
SP
SNFCA
GEH
SBRAP
DGICA
JPMpE
WFCpP
GSpD
AXL... (5 Replies)
Discussion started by: jakSun8
5 Replies
LEARN ABOUT PHP
cubrid_insert_id
CUBRID_INSERT_ID(3) 1 CUBRID_INSERT_ID(3)cubrid_insert_id - Return the ID generated for the last updated AUTO_INCREMENTcolumnSYNOPSIS
string cubrid_insert_id ([resource $conn_identifier])
DESCRIPTION
The cubrid_insert_id(3) function retrieves the ID generated for the AUTO_INCREMENT column which is updated by the previous INSERT query.
It returns 0 if the previous query does not generate new rows, or FALSE on failure.
Note
CUBRID supports AUTO_INCREMENT for more than one columns in a table. In most cases, there will be a single AUTO_INCREMENT column in
a table. If there are multiple AUTO_INCREMENT columns, this function should not be used even if it will return a value.
PARAMETERS
o $conn_identifier
- The connection identifier previously obtained by a call to cubrid_connect(3).
RETURN VALUES
A string representing the ID generated for an AUTO_INCREMENT column by the previous query, on success.
0, if the previous query does not generate new rows.
FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 8.4.0 | |
| | |
| | Change the return value from an array to string; |
| | Remove the first parameter class_name. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
cubrid_insert_id(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
@cubrid_execute($conn, "DROP TABLE cubrid_test");
cubrid_execute($conn, "CREATE TABLE cubrid_test (d int AUTO_INCREMENT(1, 2), t varchar)");
for ($i = 0; $i < 10; $i++) {
cubrid_execute($conn, "INSERT INTO cubrid_test(t) VALUES('cubrid_test')");
}
$id = cubrid_insert_id();
var_dump($id);
cubrid_disconnect($conn);
?>
The above example will output:
string(2) "19"
PHP Documentation Group CUBRID_INSERT_ID(3)