PHP 8.5.0 Alpha 1 available for testing

Voting

: max(three, four)?
(Example: nine)

The Note You're Voting On

ir on ir id is at gm ai ld ot co m
17 years ago
Keep in mind that storing IP addresses inside of your database as integers (rather than 15 character strings in decimal format, or 8 character strings in hex format) is hundreds of times faster.

Take the typical case of a MySQL database doing a search for an IP address on thousands (or millions!) of rows; you're either doing a string compare for each entry, or an integer equation. If you do your indexes correctly, your lookups should be literally 100x faster using an INT rather than a VARCHAR.

Also note that an integer doesn't need to be escaped when passed to a database. :)

<< Back to user notes page

To Top