| From: | Jason <gee308(at)mediaone(dot)net> |
|---|---|
| To: | pgsql-php(at)postgresql(dot)org |
| Cc: | pgsql-novice(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
| Subject: | psql with PHP question |
| Date: | 2001-05-03 12:06:25 |
| Message-ID: | 3AF149C1.AEC30AA9@mediaone.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-novice pgsql-php |
Hi, I want to try and optimize my calls to postgreSQL from PHP. If
I only need one field from a select statement, what should I use? I am
currently using:
$q = pg_Exec("SELECT id FROM article WHERE id=(SELECT MAX(id)
FROM article)");
$maxid = pg_fetch_array($q, 0);
echo "The highest id is ". $maxid[0];
What can I use besides an array to get a single value? In general, using
a single variable always saves more memory than using an array? Thank
you.
Jason
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michelle Murrain | 2001-05-03 12:39:18 | Re: Perl Scope problem |
| Previous Message | Andy Howarth | 2001-05-03 11:35:24 | Problems compiling 7.1 with TCL support on Solaris 7 |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tod McQuillin | 2001-05-03 12:49:14 | Re: psql with PHP question |
| Previous Message | Andy Howarth | 2001-05-03 11:35:24 | Problems compiling 7.1 with TCL support on Solaris 7 |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tod McQuillin | 2001-05-03 12:49:14 | Re: psql with PHP question |
| Previous Message | Andy Howarth | 2001-05-03 11:35:24 | Problems compiling 7.1 with TCL support on Solaris 7 |