Web 2.0, Php, MySQL, HTML, CSS, Wordpress, Javascript, iTouch iPod, iPhone, Adobe…
4 Feb
You may think with “125.125.1.1″, you would want a VarChar type of field. That would be my first instinct until this tip made me think. If you are storing an IP Address in MySql (or any database for that matter) it’s better to store it as an Integer. MySQL has two built-in functions: INET_ATON() and INET_NTOA() to convert the IP. This allows for better storage and possible indexing.
31 Jan
This is a bugger to figure out - basically I was using php to read a varchar value in a SQL database. Problem was, my returning value was cut off at around 255 or 256 characters. Even changing the mssql.textlimit and mssql.textsize values in the php.ini file didn’t help. The answer, it seems, is to preform a little conversation in your SQL SELECT statement:
select *, convert(text,bio) as bio from writers
So if “bio” is the field that is in the SQL database than contains more than 256 characters, the above should give you ALL those characters back.