I titled my question - as a single question - but for convenience of the community I clearly described the parts of converting the included PHP MySQLi prepared statements to PHP PostgreSQL statements that I'm having trouble with. And I included descriptions of what each code block did, commenting my working MySQLi statements and using <--- arrows with text following to point out which functions I was having trouble substituting.
I made an effort to read the right docs and even searched two books on the subject before posting too. And I have seen many posts on Stack Overflow where people have simply asked for someone to write them code from scratch without such effort as I put in, and others have helped.
Instead I got harassed by one of the commenters for not 'RTFM' and the one that answered part of my question but preferred me to use PDO, lectured me about not asking the right question, reading the docs, etc. and then officiously tried to cull the comment history and paint my 'expectations' for an answer as going beyond my original question.
Why bother using Stack Overflow when people like this feel entitled to denigrate people asking questions that are framed as articulately as they can within their current knowledge of the subject?
I feel their comments go directly against the original purpose of this site and its community.