[PHP] psql with PHP question

Поиск
Список
Период
Сортировка
От Jason
Тема [PHP] psql with PHP question
Дата
Msg-id 3AF149C1.AEC30AA9@mediaone.net
обсуждение исходный текст
Ответ на Problems compiling 7.1 with TCL support on Solaris 7  (Andy Howarth <andy@is3-design.com>)
Список pgsql-novice
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


В списке pgsql-novice по дате отправления:

Предыдущее
От: Luis Amigo
Дата:
Сообщение: bug?? on oid2name
Следующее
От: Adrian Stovall
Дата:
Сообщение: Perl and pgsql...