Brain Goo

Carpe Crap ’em

Brain Goo header image 4

Ads help keep this site alive:

Entries Tagged as 'SQL'

SQL: Select duplicate rows, select indistinct rows

October 27th, 2008 · 1 Comment

Using SQL, MySQL or whatever your favorite database may be, we all know using SELECT DISTINCT will return unique values in case a value appears more than once in a table. How do you fine duplicates? What if I want to know where the duplicates are? The trick is to use count() and compare it […]

[

Tags: How Tos · mysql · SQL

Quick Character Escaping in PHP

October 10th, 2007 · No Comments

When writing PHP web apps, I tend to run in to a portability issue when dealing with SQL connectivity. Since I can’t count on having the PEAR DB module available, I rolled my own set of functions to interact with a MySQL database. The problem lies in escaping characters in your SQL queries. Do I […]

[

Tags: php · Programming · SQL