Re: [PHP-DB] Query Question

2011-05-23 Thread maarten
I would keep the db names and/or schema names in your queries. It clarifies what you are doing with the query making it easier for someone else to debug, improve, ... Certainly for those not familiar with your db structure. I am not aware of any drawbacks that can result from this. (Ok, maybe

[PHP-DB] Re: Where to put submit button with multiple _GET or _POST??

2011-05-23 Thread Geoff Lane
On Monday, May 23, 2011, Fahim Mohammad wrote; How to reset all the options by pressing the reset button once???. --- Unless I've read your question incorrectly, HTML provides the means for this with a standard reset button: input type=reset or input type=reset value=Reset Form HTH, --

Re: [PHP-DB] Query Question

2011-05-23 Thread maarten
That's a very good point, but since I use postgres that's one point that doesn't affect me and as such didn't cross my mind at the time. (Postgres uses schemas where mysql uses databases, a different database on postgres usually means a different database machine. And joining tables from

[PHP-DB] Prepared Statements Rows Selected

2011-05-23 Thread Ron Piggott
What command will tell me the # of rows the SELECT query retrieved using Prepared Statements. $dsh = 'mysql:host=localhost;dbname='.$database; $dbh = new PDO($dsh, $username, $password); $stmt = $dbh-prepare($query); $stmt-bindParam(':email', $email); $stmt-bindParam(':pass', $pass);

Re: [PHP-DB] Prepared Statements Rows Selected

2011-05-23 Thread Giff Hammar
$stmt-rows() should give you the number of rows returned. Giff On Mon, 2011-05-23 at 18:53 -0400, Ron Piggott wrote: What command will tell me the # of rows the SELECT query retrieved using Prepared Statements. $dsh = 'mysql:host=localhost;dbname='.$database; $dbh = new PDO($dsh,