[wp-trac] [WordPress Trac] #21663: Use PDO or mysqli for MySQL queries when available
WordPress Trac
noreply at wordpress.org
Fri Nov 22 01:43:08 UTC 2013
#21663: Use PDO or mysqli for MySQL queries when available
--------------------------------------------------+------------------
Reporter: scottconnerly | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.8
Component: Database | Version: 3.5
Severity: normal | Resolution:
Keywords: dev-feedback has-patch needs-testing |
--------------------------------------------------+------------------
Comment (by dd32):
Replying to [comment:139 aaroncampbell]:
> Replying to [comment:137 dd32]:
> > Quick thoughts on [attachment:21663.3.diff], Perhaps it'd be best to
stick to full if's rather than ternaries? It makes the diff nice and
short, but would be much more readable with full if's instead.
>
> After creating the diff I thought about that. I stuck with the
ternaries because they're beneficial for the while (such as `while ( $row
= ( $this->use_mysqli )? @mysqli_fetch_object( $this->result ) :
@mysql_fetch_object( $this->result ) )` ) and using them everywhere kept
things uniform. I can break most of them into full ifs though.
Ah didn't notice those. I think going for a full `if () { while(){}; }
else { while(){}; }` would be more readable anyway, just my thoughts
though.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21663#comment:140>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list