mySql error 1005 (errno: 150) solution This mysql error occurs when creating a table with the InnoDB engine and is basically telling you that there is a "foreign key problem" with your schema. The thing to check to fix this error is to make sure that your foreign key fields are of the same datatype as their source fields. As an example, assume the main table is "people", … [Read more...] about mySql error 1005 (errno: 150)
PHP/MySQL: How to Store Queries in a Separate Include File
When implementing a php/mysql database (or any database for that matter), it's sometimes easy to have all of the queries located in one place, as opposed to having them hard-coded into the pages. If the queries are hard-coded in, and the queries are reused on multiple pages (which they often are), it can be a cumbersome task to update all of the queries. Having hard-coded … [Read more...] about PHP/MySQL: How to Store Queries in a Separate Include File
Regular Expression for Single Letter – PHP
I was working on a project where I needed to validate a querystring for a single letter -- uppercase or lowercase. Since there is no php equivalent to the is_numeric() function, (e.g. a hypothetical is_alpha() function) I decided to use regular expressions to get the task done. I could have used ctype_alpha(), but that function wouldn't account for the fact that I needed to … [Read more...] about Regular Expression for Single Letter – PHP
Active Content Restricted Error in Internet Explorer
Now this is an error that rattled my brain for a few days. Here's the issue: when you are working on website and you are testing locally, you may find that when you try to view the site with Internet Explorer you get the error: To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for … [Read more...] about Active Content Restricted Error in Internet Explorer
Create Two Column Table with Bullet Points Without Using
Recently I had the task of adding bullets to items in a pre-existing two-column HTML table. I first started to look at how to add the bullets using css to format the <TABLE> or <TD> tags, and then I looked at using css to make two columns of separate lists using <UL> and <LI> tags. I eventually found an easier solution: ASCII codes. This article will … [Read more...] about Create Two Column Table with Bullet Points Without Using