If you are trying to select records whose ids are not present in the other table,

eg: articles table has article_id, categorized table has article_id and cat_id.
If you are trying to select the article that is not categorized yet



SELECT * FROM articles WHERE article_id NOT IN ( SELECT article_id FROM categorized );



That will solve your problem.

SQL to filter duplicate records

If you are trying to filter out duplicate records from your table.



SELECT DISTINCT column_name,id FROM table_name
GROUP BY coulumn_name
HAVING COUNT(column_name) > 1



The above sql would filter out duplicate records with their ids.

cheers.

SQL to get count of records

This is for MySQL I have no idea about other DBs



$query = mysql_query("SELECT count(*) FROM accounts");
$ctr = mysql_result($query,0,0);


Hope it helps someone.

If you happened to see ^M at end of every line of your code, it's a real pain. You can remove the character from the file somehow.

from your command line (Linux)

1) sed -e 's/^M//g' index.php > ind.php
[ ctrl v + ctrl M would give your ^M char on command line ]

2) mv ind.php index.php

Now, your index file is free of ^M characters. Enjoy coding.

Modify User Registration of Joomla

If you'd like to change user registration page of Joomla, follow the following steps to accomplish it.

1) Change in template file (under components/user/)
2) modify /libraries/joomla/user/user.php
3) modify /libraries/joomla/database/table/user.php

and also modify users table of joomla using any db admin scripts eg:phpMyadmin

Modify those files as per your request, you will see a modified user registration page of Joomla.

If you are looking forward to enable Javascript in different browsers, just check whether it's disabled first by visiting the site.

www.isjavascriptenabled.com

That would tell you whether it's enabled or disabled

How to enable the Javascript now?

Go to the site get info as per your browser.

www.tranexp.com/win/JavaScript-enabling.htm

Redirect using mod_rewrite

if you are trying to redirect any subdomain request to the root, try the following method. The URL will not change in the address bar.

RewriteCond %{HTTP_HOST} ^business\.rootdomain\.com
RewriteCond %{REQUEST_URI} !^/business/
RewriteRule (.*) http://www.rootdomain.com/business/$1 [P]

if you get any internal error, add proxy & proxy http modules to Apache.

restart the web server,it should work now.



Some Links (off programming)