Enclosing values in single quotes

From: Ma Siva Kumar <siva(at)leatherlink(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Enclosing values in single quotes
Date: 2002-06-18 06:40:58
Message-ID: 02061812084601.01966@Bharathi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)leatherlink(dot)net
Website: http://www.leatherlink.net/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Varun Kacholia 2002-06-18 07:00:47 Re: Wierd Explain
Previous Message Martijn van Oosterhout 2002-06-18 06:19:34 Re: regular expression question