Hi All,
I have 5000 records like this
Request_id|Type|Status|Priority|Ticket Submitted Date and Time|Actual Resolved Date and Time|Current Ticket Owner Group|Case final Ticket Owner Group|Customer Severity|Reported Symptom/Request|Component|Hot Topic|Reason for Missed SLA|Current Ticket... (2 Replies)
Hi,
I have input file contains sql queries i need to eliminate newlines from it.
when i open it vi text editor and runs
:%s/'\n/'/g
it provides required result. but when i run sed command from shell prompt it doesn't impact outfile is still same as inputfile.
shell] sed -e... (6 Replies)
I have a file (test.dat) which contains data like this
459|199811047|a |b |shan
kar|ooty|
460|199811047|a |bv |gur
u|cbe|
but I need it like:
459|199811047|a |b |shankar|ooty|
460|199811047|a |b |guru|cbe|
While reading the data from this file, I don't want to remove newline from the end of... (4 Replies)
In my file, i have 4 Product names(For ex:Microsoft excel, Oracle,.Net,IBM websphere,..etc.,) I want this 4 Products in 4 individual .csv/excel file after running the script with those products related information. (12 Replies)
hi i am having delimited .dat file having content like below.
test.dat(5 line of records)
======
PT2~Stag~Pt2 Stag Test.
Updated~PT2 S T~Area~~UNCEF R20~~2012-05-24 ~2014-05-24~~
PT2~Stag y~Pt2 Stag Test.
Updated~PT2 S T~Area~METR~~~2012-05-24~2014-05-24~~test
PT2~Pt2 Stag Test~~PT2 S... (4 Replies)
my file input is with tab as delimiter, and in every line, there would be a skip of line with an unexcepted newline breaker. I'd like to remove this \n and put the information in the same line.
INPUT
a1 b1b2 c1
c2 d1
a2 b3 c3 d4
OUTPUT
a1 b1b2 c1c2 ... (9 Replies)
Hi all..
I have a text file which looks like below:
abcd
efgh
ijkl
(blank space)
I need to remove only the last (blank space) from the file. When I try wc -l the file name,the number of lines coming is 3 only, however blank space is there in the file.
I have tried options like... (14 Replies)
Hi All,
Need help in identifying a shellscript command to remove all files on a server directory, starting with a certain prefix and also older than 3 days.
That means files created with that prefix, today or yesterday, shouldn't be removed.
Thanks,
Dev (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
LEARN ABOUT PHP
cubrid_next_result
CUBRID_NEXT_RESULT(3) 1 CUBRID_NEXT_RESULT(3)cubrid_next_result - Get result of next query when executing multiple SQL statementsSYNOPSIS
bool cubrid_next_result (resource $result)
DESCRIPTION
The cubrid_next_result(3) function is used to get results of next query if multiple SQL statements are executed and CUBRID_EXEC_QUERY_ALL
flag is set upon cubrid_execute(3).
PARAMETERS
o $result
-$result comes from a call to cubrid_execute(3)RETURN VALUES
TRUE, when process is successful.
FALSE, when process is unsuccessful.
EXAMPLES
Example #1
cubrid_next_result(3) example
<?php
$conn = cubrid_connect("127.0.0.1", 33000, "demodb", "dba");
$sql_stmt = "SELECT * FROM code; SELECT * FROM history WHERE host_year=2004 AND event_code=20281";
$res = cubrid_execute($conn, $sql_stmt, CUBRID_EXEC_QUERY_ALL);
get_result_info($res);
cubrid_next_result($res);
get_result_info($res);
function get_result_info($req)
{
printf("
------------ get_result_info --------------------
");
$row_num = cubrid_num_rows($req);
$col_num = cubrid_num_cols($req);
$column_name_list = cubrid_column_names($req);
$column_type_list = cubrid_column_types($req);
$column_last_name = cubrid_field_name($req, $col_num - 1);
$column_last_table = cubrid_field_table($req, $col_num - 1);
$column_last_type = cubrid_field_type($req, $col_num - 1);
$column_last_len = cubrid_field_len($req, $col_num - 1);
$column_1_flags = cubrid_field_flags($req, 1);
printf("%-30s %d
", "Row count:", $row_num);
printf("%-30s %d
", "Column count:", $col_num);
printf("
");
printf("%-30s %-30s %-15s
", "Column Names", "Column Types", "Column Len");
printf("------------------------------------------------------------------------------
");
$size = count($column_name_list);
for($i = 0; $i < $size; $i++) {
$column_len = cubrid_field_len($req, $i);
printf("%-30s %-30s %-15s
", $column_name_list[$i], $column_type_list[$i], $column_len);
}
printf("
");
printf("%-30s %s
", "Last Column Name:", $column_last_name);
printf("%-30s %s
", "Last Column Table:", $column_last_table);
printf("%-30s %s
", "Last Column Type:", $column_last_type);
printf("%-30s %d
", "Last Column Len:", $column_last_len);
printf("%-30s %s
", "Second Column Flags:", $column_1_flags);
printf("
");
}
?>
The above example will output:
------------ get_result_info --------------------
Row count: 6
Column count: 2
Column Names Column Types Column Len
------------------------------------------------------------------------------
s_name char 1
f_name varchar 6
Last Column Name: f_name
Last Column Table: code
Last Column Type: varchar
Last Column Len: 6
Second Column Flags:
------------ get_result_info --------------------
Row count: 4
Column count: 5
Column Names Column Types Column Len
------------------------------------------------------------------------------
event_code integer 11
athlete varchar 40
host_year integer 11
score varchar 10
unit varchar 5
Last Column Name: unit
Last Column Table: history
Last Column Type: varchar
Last Column Len: 5
Second Column Flags: not_null primary_key unique_key
SEE ALSO cubrid_execute(3).
PHP Documentation Group CUBRID_NEXT_RESULT(3)