Posts tagged mysql

wampserver

Using Debugging and Unit Testing tools with your PHP application: WAMPServer

0

In order to start youre going to need the basic items for developing PHP apps; a webserver, the PHP executable, and a database. Now the webserver and database you can use whatever you want, but for this example I’m going to follow the KISS principle and throw on a handy product that bundles all three needs in one installation. And it doesn’t hurt that it has Apache and MySQL, the PHP developers most popular tools. For those that are on non-windows systems, you’ll have to install each software package manually, but thankfully they’re usually in the repository that your operating system comes with. At least, they are for Ubuntu and BSD.

(more…)

Getting a lot of 0′s in front of your numbers using mysql?

0

This might be the reason why.

Was doing some debugging for an application that I’m working on in my spare time, using PHP and MySQL (how original). For one of the pages, the userID’s were stored in an int field with eleven spaces, more then enough for the amount of users I eve expected to stop by. However, when I went to view the data stored by my session, the userID was stored as 00000000001. What was going on?

The answer it seems, was as simple as unchecking the option for zerofill. Once removed, the numbers looked as expected. Gotta love simple solutions.

Now I could not find out why someone would want this feature enabled (maybe to make their pages less empty?), but it did at least fill my “learn something new today” quotient.

Go to Top