So I have another noob question. In fact - two questions:
What’s best way to access MySQL? “require ‘mysql’”? “require ‘dbi’”?
I’m confused… DBI doesn’t seem to return the number of rows matched by
a query (even though sth.rows method is there - it always returns 0).
How do I pass an array to bind? For example:
bindParams = [ 1, 2 ]
sth = dbh.prepare( "select * from table where a = ? and b = ? " )
sth.execute( bindParams )
That’s how I, having mostly developed software in Perl, would do it. But
apparently that’s not how DBI expects it - it does not accept an array,
it seems to expect me specifically list all individual values (as in
sth.execute( bindParams, bindParams ) - what am I missing?