PHP/PDO: style of write many queries on one page?

Cokeeresbog

New Member
An example of my scenario is a large setup page for an application, the method I use is for example:\[code\]//query 1$stmt = $dbh->prepare("...");$stmt->execute();//query 2$stmt = $dbh->prepare("...");$stmt->execute();\[/code\]Would this be an accepted method to write more queries? I have no clue how it's supposed to be done (or who does what, rather), I assume writing the second \[code\]$stmt\[/code\] is the most acceptable way, as there is no need to create other variables, am I right?I really wish to know how people do this sort of thing.. I don't want to release 'ugly' code if I have to.
 
Back
Top