Enclosing values in single quotes

Поиск
Список
Период
Сортировка
От Ma Siva Kumar
Тема Enclosing values in single quotes
Дата
Msg-id 02061812084601.01966@Bharathi
обсуждение исходный текст
Ответы Re: Enclosing values in single quotes  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
I am trying to write a function which takes in an associative array (from a
user submitted form for example), converts the keys to a column array and
values to a value array. These arrays together with the name of the database
table are fed into another function, which generates the query string (insert
into $table ($colmn) values ($value)).

As a short cut,  I am enclosing all the values (numeric as well as strings)
in single quotes when generating the arrays.  In my trials so far,
everything is fine. What will be the issues in enclosing numeric values in
single quotes?

(I am learning this as a hobby and I do not have any formal training in
programming).

Any advice please.

Siva


--
Ma Siva Kumar
BSG LeatherLink,
No. 9, Trump Castle,
AI/92-A, 9th Main Road,
Anna Nagar, Chennai,
Tamil Nadu, India - 600040

Email: siva@leatherlink.net
Website: http://www.leatherlink.net/

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: regular expression question
Следующее
От: Varun Kacholia
Дата:
Сообщение: Re: Wierd Explain