On Dec 10, 2007, at 2:19 PM, Mike McGonagle wrote:
On 12/10/07, Jamie Bullock jamie@postlude.co.uk wrote: PREPARE uses the '$' character as its placeholder identifier, and '$1'
Jamie, after thinking about this, I don't think we should worry
about the specifics of the characters that we use, as long as we
can agree on what gets entered into a PD message box, the specific
instance of the external ('sqlite', 'psql', etc.) can handle the
conversion to what the specific database uses.From what I have seen on this thread, is it right that the '?'
syntax does NOT have an identifier following it? I think it would
be very helpful if we use identifiers in the SQL if only to make
the binding to the proper datatypes easier, as per my last email.
It seems many things use the "?" alone as the unnamed placeholder,
but I only saw MySQL using ?name for named placeholders. It does
seem like a nicer syntax rather than using a different character.
Perhaps, we should follow pgsql and use "$" and "$name", since "$" is
already a marker for replacement vars in Pd. I suppose that could
get confusing in something like:
SELECT id, ABS(($duration - $1)/$2) AS error FROM datatable ORDER BY
error LIMIT 1
.hc
Mike
-- Peace may sound simple—one beautiful word— but it requires
everything we have, every quality, every strength, every dream,
every high ideal. —Yehudi Menuhin (1916–1999), musician _______________________________________________ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list
If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an
idea, which an individual may exclusively possess as long as he keeps
it to himself; but the moment it is divulged, it forces itself into
the possession of everyone, and the receiver cannot dispossess
himself of it. - Thomas Jefferson