I have a variable that is outputting a lot of space.
here has been 45 lines returned ...
how can I remove the spaces between the "been and the 45"
CODE:
fil_len=`wc -l < coshb.txt`
if ; then
cat coshb.txt | more
echo " "
echo "There has been ${fil_len} lines... (4 Replies)
I have a question about the accuracy of prstat.
I did a 'prstat -t' and it shows 99% of my memory is occupied by oracle.
NPROC USERNAME SIZE RSS MEMORY TIME CPU
194 oracle 343G 340G 99% 86:17.24 56%
However, 'top' shows I still have 7762meg of memory free.
Memory: 16G real, 7762M... (4 Replies)
Hi
I am facing a strange problem
a=03
echo ${a}
the output is 3
But i want to display it is 03
Can you people help me how to display it like 03.
Thanks (2 Replies)
I have an overnight script which runs across a large directory to repair permissions and ownership. I also have this command output the list of files affected so that cron can email these as a log file. Previously I had the command in the form:
find /path/to/files -not -user myname -print -exec... (4 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
What single command line would you enter to get the following output?
8140 drwxr-xr-x 9 root bin 18 Jan 20... (6 Replies)
Hi, perhaps this is a dumb question.
I'm running queries on mysql and I'm getting tabbed results like these:
mysql> SELECT * from metrics_status WHERE date = '2012-03-30';
<TABLE... (1 Reply)
lets say I am printing something out
echo "Please enter a valid username"
and its being printed out 5 times, is there any way I can limit to only being displayed ONCE. I tried echo -n but that just makes everything fit on one line.
Right now it keeps saying
Please enter a valid... (5 Replies)
I have a file like this:
AAEQGAGNQPQH,,,,160,32,,,,
AAGQDYNSPLH,,712,39,,,,,,
AAGREGGNTEAF,26,,,,,,,,4
AAGSPQH,,,,8,5,,,,
AAKKLGQFYNEQF,4,,6,,,7,,,2
AANSGGRYNEQF,,2747,3120,,,,,,
AAQGGVGGELF,,,,5,,12,36,,
AAQGLAGYYEQY,,25,13,,,,,,
AAQRGNEQF,510,2,,,6,,6,,76
AAQTGENSPLH,,16,16,,,,,,
The... (9 Replies)
Discussion started by: xshang
9 Replies
LEARN ABOUT PHP
fbsql_fetch_array
FBSQL_FETCH_ARRAY(3) 1 FBSQL_FETCH_ARRAY(3)fbsql_fetch_array - Fetch a result row as an associative array, a numeric array, or bothSYNOPSIS
array fbsql_fetch_array (resource $result, [int $result_type])
DESCRIPTION fbsql_fetch_array(3) is a combination of fbsql_fetch_row(3) and fbsql_fetch_assoc(3).
An important thing to note is that using fbsql_fetch_array(3) is NOT significantly slower than using fbsql_fetch_row(3), while it provides
a significant added value.
PARAMETERS
o $
result -A result identifier returned by fbsql_query(3) or fbsql_db_query(3).
o $result_type
- A constant and can take the following values: FBSQL_ASSOC, FBSQL_NUM, or FBSQL_BOTH. When using FBSQL_BOTH, in addition to
storing the data in the numeric indices of the result array, it also stores the data in associative indices, using the field names
as keys.
RETURN VALUES
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.
If two or more columns of the result have the same field names, the last column will take precedence. To access the other column(s) of the
same name, you must the numeric index of the column or make an alias for the column.
select t1.f1 as foo t2.f1 as bar from t1, t2
EXAMPLES
Example #1
fbsql_fetch_array(3) example
<?php
fbsql_connect($host, $user, $password);
$result = fbsql_db_query("database", "select user_id, fullname from table");
while ($row = fbsql_fetch_array($result)) {
echo "user_id: " . $row["user_id"] . "<br />
";
echo "user_id: " . $row[0] . "<br />
";
echo "fullname: " . $row["fullname"] . "<br />
";
echo "fullname: " . $row[1] . "<br />
";
}
fbsql_free_result($result);
?>
SEE ALSO fbsql_fetch_row(3), fbsql_fetch_assoc(3), fbsql_fetch_object(3).
PHP Documentation Group FBSQL_FETCH_ARRAY(3)