01-16-2002
is this what you want;
select count(*),request_status
from table_name
group by request_status
let me know.
- Ed
8 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi ... apologies for posting in this section ... I figured this would be the best place to pose this question - does anyone know a good forum for selling Unix related hardware - I have a handful of HP C3750's that I would like to sell. I am located in Toronto. Thx. (2 Replies)
Discussion started by: krs1
2 Replies
2. AIX
Which Forum for IBM Storage production are good? (1 Reply)
Discussion started by: rainbow_bean
1 Replies
3. UNIX for Advanced & Expert Users
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Discussion started by: huasheng8
3 Replies
4. What is on Your Mind?
This forum has been so instrumental in my learning scripting and unix commands that I seriously can't believe it and have been advertising it to everyone I know. I started from almost zero knowledge and within a few months I already feel much less ignorant.
The amount of information and... (7 Replies)
Discussion started by: newbie2010
7 Replies
5. What is on Your Mind?
Just a quick update; to speed up the forums, I have disabled the forum statistics on the home page for non registered users.
No changes for registered users. (0 Replies)
Discussion started by: Neo
0 Replies
6. Shell Programming and Scripting
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies
7. UNIX and Linux Applications
Good evening, i need to ask a question to those who have been working with oracle database.
I am a newbie in oracle Databases and Ive been looking for any specific oracle forum and i have found hundrends of them. could you recomend a good one from different levels from the basic ones ?
i... (2 Replies)
Discussion started by: alexcol
2 Replies
8. What is on Your Mind?
For mobile users, I have just added a "first beta" Advanced Forum Statistics to the home page on mobile using CSS overflow:auto; so you can swipe if you need to see more. Google Search Console mobile usability says this page is "mobile friendly" so perhaps this will be useful for some of our... (12 Replies)
Discussion started by: Neo
12 Replies
LEARN ABOUT PHP
pg_insert
PG_INSERT(3) PG_INSERT(3)
pg_insert - Insert array into table
SYNOPSIS
mixed pg_insert (resource $connection, string $table_name, array $assoc_array, [int $options = PGSQL_DML_EXEC])
DESCRIPTION
pg_insert(3) inserts the values of $assoc_array into the table specified by $table_name. If $options is specified, pg_convert(3) is applied
to $assoc_array with the specified options.
PARAMETERS
o $connection
- PostgreSQL database connection resource.
o $table_name
- Name of the table into which to insert rows. The table $table_name must at least have as many columns as $assoc_array has ele-
ments.
o $assoc_array
- An array whose keys are field names in the table $table_name, and whose values are the values of those fields that are to be
inserted.
o $options
- Any number of PGSQL_CONV_OPTS, PGSQL_DML_NO_CONV, PGSQL_DML_ESCAPE, PGSQL_DML_EXEC, PGSQL_DML_ASYNC or PGSQL_DML_STRING com-
bined. If PGSQL_DML_STRING is part of the $options then query string is returned. When PGSQL_DML_NO_CONV or PGSQL_DML_ESCAPE is
set, it does not call pg_convert(3) internally.
RETURN VALUES
Returns TRUE on success or FALSE on failure. Returns string if PGSQL_DML_STRING is passed via $options.
EXAMPLES
Example #1
pg_insert(3) example
<?php
$dbconn = pg_connect('dbname=foo');
// This is safe, since $_POST is converted automatically
$res = pg_insert($dbconn, 'post_log', $_POST);
if ($res) {
echo "POST data is successfully logged
";
} else {
echo "User must have sent wrong inputs
";
}
?>
CHANGELOG
+-------------+---------------------------------------------------+
| Version | |
| | |
| | Description |
| | |
+-------------+---------------------------------------------------+
| 5.6.0 | |
| | |
| | No longer experimental. Added PGSQL_DML_ESCAPE |
| | constant, TRUE/ FALSE and NULL data type support. |
| | |
|5.5.3/5.4.19 | |
| | |
| | Direct SQL injection to $table_name and Indirect |
| | SQL injection to identifiers are fixed. |
| | |
+-------------+---------------------------------------------------+
SEE ALSO
pg_convert(3).
PHP Documentation Group PG_INSERT(3)