diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim
index 1dbabc3..e5d910e 100644
--- a/runtime/autoload/phpcomplete.vim
+++ b/runtime/autoload/phpcomplete.vim
@@ -1,7 +1,7 @@
 " Vim completion script
 " Language:	PHP
 " Maintainer:	Mikolaj Machowski ( mikmach AT wp DOT pl )
-" Last Change:	2006 Apr 30
+" Last Change:	2006 May 9
 "
 "   TODO:
 "   - Class aware completion:
@@ -74,7 +74,7 @@
 		let file = getline(1, '$')
 		call filter(file,
 				\ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
-		let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
+		let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
 		let jfile = join(file, ' ')
 		let int_values = split(jfile, 'class\s\+')
 		let int_classes = {}
@@ -85,33 +85,43 @@
 			endif
 		endfor
 
-		" Prepare list of functions from tags file
+		" Prepare list of classes from tags file
 		let ext_classes = {}
-		let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
+		let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
 		if fnames != ''
 			exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames
 			let qflist = getqflist()
-			for field in qflist
-				" [:space:] thing: we don't have to be so strict when
-				" dealing with tags files - entries there were already
-				" checked by ctags.
-				let item = matchstr(field['text'], '^[^[:space:]]\+')
-				let ext_classes[item] = ''
+			if len(qflist) > 0
+				for field in qflist
+					" [:space:] thing: we don't have to be so strict when
+					" dealing with tags files - entries there were already
+					" checked by ctags.
+					let item = matchstr(field['text'], '^[^[:space:]]\+')
+					let ext_classes[item] = ''
+				endfor
+			endif
+		endif
+
+		" Prepare list of built in classes from g:php_builtin_functions
+		if !exists("g:php_omni_bi_classes")
+			let g:php_omni_bi_classes = {}
+			for i in keys(g:php_builtin_object_functions)
+				let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = ''
 			endfor
 		endif
 
-		call extend(int_classes, ext_classes)
+		let classes = sort(keys(int_classes))
+		let classes += sort(keys(ext_classes))
+		let classes += sort(keys(g:php_omni_bi_classes))
 
-		for m in sort(keys(int_classes))
+		for m in classes
 			if m =~ '^'.a:base
 				call add(res, m)
 			endif
 		endfor
 
-		let int_list = res
-
 		let final_menu = []
-		for i in int_list
+		for i in res
 			let final_menu += [{'word':i, 'kind':'c'}]
 		endfor
 
@@ -138,6 +148,19 @@
 				let classlocation = ''
 			endif
 
+			if classlocation == 'VIMPHP_BUILTINOBJECT'
+
+				for object in keys(g:php_builtin_object_functions)
+					if object =~ '^'.classname
+						let res += [{'word':substitute(object, '.*::', '', ''),
+							   	\    'info': g:php_builtin_object_functions[object]}]
+					endif
+				endfor
+
+				return res
+
+			endif
+
 			if filereadable(classlocation)
 				let classfile = readfile(classlocation)
 				let classcontent = ''
@@ -154,7 +177,7 @@
 				" Functions declared with public keyword or without any
 				" keyword are public
 				let functions = filter(deepcopy(sccontent),
-						\ 'v:val =~ "^\\s*\\(public\\s\\*\\)\\?function"')
+						\ 'v:val =~ "^\\s*\\(static\\s\\+\\|public\\s\\+\\)*function"')
 				let jfuncs = join(functions, ' ')
 				let sfuncs = split(jfuncs, 'function\s\+')
 				let c_functions = {}
@@ -185,7 +208,6 @@
 				let all_values = {}
 				call extend(all_values, c_functions)
 				call extend(all_values, c_variables)
-				call extend(all_values, g:php_builtin_object_functions)
 
 				for m in sort(keys(all_values))
 					if m =~ '^'.a:base && m !~ '::'
@@ -244,23 +266,25 @@
 
 		" ctags has good support for PHP, use tags file for external
 		" variables
-		let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
+		let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
 		let ext_vars = {}
 		if fnames != ''
 			let sbase = substitute(a:base, '^\$', '', '')
 			exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
 			let qflist = getqflist()
-			for field in qflist
-				let item = matchstr(field['text'], '^[^[:space:]]\+')
-				" Add -> if it is possible object declaration
-				let classname = ''
-				if field['text'] =~ item.'\s*=\s*new\s\+'
-					let item = item.'->'
-					let classname = matchstr(field['text'],
-							\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
-				endif
-				let ext_vars[adddollar.item] = classname
-			endfor
+			if len(qflist) > 0
+				for field in qflist
+					let item = matchstr(field['text'], '^[^[:space:]]\+')
+					" Add -> if it is possible object declaration
+					let classname = ''
+					if field['text'] =~ item.'\s*=\s*new\s\+'
+						let item = item.'->'
+						let classname = matchstr(field['text'],
+								\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
+					endif
+					let ext_vars[adddollar.item] = classname
+				endfor
+			endif
 		endif
 
 		" Now we have all variables in int_vars dictionary
@@ -270,7 +294,7 @@
 		let file = getline(1, '$')
 		call filter(file,
 				\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
-		let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
+		let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
 		let jfile = join(file, ' ')
 		let int_values = split(jfile, 'function\s\+')
 		let int_functions = {}
@@ -287,14 +311,16 @@
 		if fnames != ''
 			exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
 			let qflist = getqflist()
-			for field in qflist
-				" File name
-				let item = matchstr(field['text'], '^[^[:space:]]\+')
-				let fname = matchstr(field['text'], '\t\zs\f\+\ze')
-				let prototype = matchstr(field['text'],
-						\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
-				let ext_functions[item.'('] = prototype.') - '.fname
-			endfor
+			if len(qflist) > 0
+				for field in qflist
+					" File name
+					let item = matchstr(field['text'], '^[^[:space:]]\+')
+					let fname = matchstr(field['text'], '\t\zs\f\+\ze')
+					let prototype = matchstr(field['text'],
+							\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
+					let ext_functions[item.'('] = prototype.') - '.fname
+				endfor
+			endif
 		endif
 
 		let all_values = {}
@@ -375,23 +401,25 @@
 		call extend(int_vars,g:php_builtin_vars)
 
 		" ctags has support for PHP, use tags file for external variables
-		let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
+		let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
 		let ext_vars = {}
 		if fnames != ''
 			let sbase = substitute(a:base, '^\$', '', '')
 			exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
 			let qflist = getqflist()
-			for field in qflist
-				let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
-				let m_menu = ''
-				" Add -> if it is possible object declaration
-				if field['text'] =~ item.'\s*=\s*new\s\+'
-					let item = item.'->'
-					let m_menu = matchstr(field['text'],
-							\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
-				endif
-				let ext_vars[item] = m_menu
-			endfor
+			if len(qflist) > 0
+				for field in qflist
+					let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
+					let m_menu = ''
+					" Add -> if it is possible object declaration
+					if field['text'] =~ item.'\s*=\s*new\s\+'
+						let item = item.'->'
+						let m_menu = matchstr(field['text'],
+								\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
+					endif
+					let ext_vars[item] = m_menu
+				endfor
+			endif
 		endif
 
 		call extend(int_vars, ext_vars)
@@ -433,7 +461,7 @@
 		let file = getline(1, '$')
 		call filter(file,
 				\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
-		let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
+		let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
 		let jfile = join(file, ' ')
 		let int_values = split(jfile, 'function\s\+')
 		let int_functions = {}
@@ -450,14 +478,16 @@
 		if fnames != ''
 			exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
 			let qflist = getqflist()
-			for field in qflist
-				" File name
-				let item = matchstr(field['text'], '^[^[:space:]]\+')
-				let fname = matchstr(field['text'], '\t\zs\f\+\ze')
-				let prototype = matchstr(field['text'],
-						\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
-				let ext_functions[item.'('] = prototype.') - '.fname
-			endfor
+			if len(qflist) > 0
+				for field in qflist
+					" File name
+					let item = matchstr(field['text'], '^[^[:space:]]\+')
+					let fname = matchstr(field['text'], '\t\zs\f\+\ze')
+					let prototype = matchstr(field['text'],
+							\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
+					let ext_functions[item.'('] = prototype.') - '.fname
+				endfor
+			endif
 		endif
 
 		" All functions
@@ -480,15 +510,17 @@
 		endfor
 
 		" Prepare list of constants from tags file
-		let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
+		let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
 		let ext_constants = {}
 		if fnames != ''
 			exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames
 			let qflist = getqflist()
-			for field in qflist
-				let item = matchstr(field['text'], '^[^[:space:]]\+')
-				let ext_constants[item] = ''
-			endfor
+			if len(qflist) > 0
+				for field in qflist
+					let item = matchstr(field['text'], '^[^[:space:]]\+')
+					let ext_constants[item] = ''
+				endfor
+			endif
 		endif
 
 		" All constants
@@ -558,7 +590,7 @@
 	endwhile
 
 	" OK, first way failed, now check tags file(s)
-	let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
+	let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
 	exe 'silent! vimgrep /^'.object.'.*\$'.object.'.*=\s*new\s\+.*\tv\(\t\|$\)/j '.fnames
 	let qflist = getqflist()
 	if len(qflist) == 0
@@ -573,6 +605,17 @@
 endfunction
 " }}}
 function! phpcomplete#GetClassLocation(classname) " {{{
+	" Check classname may be name of built in object
+	if !exists("g:php_omni_bi_classes")
+		let g:php_omni_bi_classes = {}
+		for i in keys(g:php_builtin_object_functions)
+			let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = ''
+		endfor
+	endif
+	if has_key(g:php_omni_bi_classes, a:classname)
+		return 'VIMPHP_BUILTINOBJECT'
+	endif
+
 	" Get class location
 	for fname in tagfiles()
 		let fhead = fnamemodify(fname, ":h")
@@ -583,8 +626,12 @@
 		let fname = escape(fname, " \\")
 		exe 'silent! vimgrep /^'.a:classname.'.*\tc\(\t\|$\)/j '.fname
 		let qflist = getqflist()
-		" As in GetClassName we can manage only one element
-		let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
+		" As in GetClassName we can manage only one element if it exists
+		if len(qflist) > 0
+			let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
+		else
+			return ''
+		endif
 		" And only one class location
 		if classlocation != ''
 			let classlocation = fhead.classlocation
@@ -614,6 +661,7 @@
 	else
 		let extends_class = ''
 	endif
+	call search('{')
 	normal! %
 	let classc = getline(cfline, ".")
 	let classcontent = join(classc, "\n")
diff --git a/runtime/autoload/sqlcomplete.vim b/runtime/autoload/sqlcomplete.vim
index 146cf21..c803932 100644
--- a/runtime/autoload/sqlcomplete.vim
+++ b/runtime/autoload/sqlcomplete.vim
@@ -1,8 +1,8 @@
 " Vim OMNI completion script for SQL
 " Language:    SQL
 " Maintainer:  David Fishburn <fishburn@ianywhere.com>
-" Version:     4.0
-" Last Change: Wed Apr 26 2006 3:00:06 PM
+" Version:     5.0
+" Last Change: Mon Jun 05 2006 3:30:04 PM
 " Usage:       For detailed help
 "              ":help sql.txt" 
 "              or ":help ft-sql-omni" 
@@ -22,7 +22,7 @@
 if exists('g:loaded_sql_completion')
     finish 
 endif
-let g:loaded_sql_completion = 40
+let g:loaded_sql_completion = 50
 
 " Maintains filename of dictionary
 let s:sql_file_table        = ""
@@ -113,7 +113,7 @@
                 " If lastword has already been set for column completion
                 " break from the loop, since we do not also want to pickup
                 " a table name if it was also supplied.
-                if lastword != -1 && compl_type == 'column'
+                if lastword != -1 && compl_type == 'column' 
                     break
                 endif
                 " If column completion was specified stop at the "." if
@@ -176,11 +176,19 @@
             return []
         endif
 
-        if s:sql_file_{compl_type} == ""
-            let compl_type = substitute(compl_type, '\w\+', '\u&', '')
-            let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
+        " Allow the user to override the dbext plugin to specify whether
+        " the owner/creator should be included in the list
+        let saved_dbext_show_owner      = 1
+        if exists('g:dbext_default_dict_show_owner')
+            let saved_dbext_show_owner  = g:dbext_default_dict_show_owner
         endif
-        let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
+        let g:dbext_default_dict_show_owner = g:omni_sql_include_owner
+
+        let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
+        if s:sql_file_{compl_type} == ""
+            let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
+        endif
+        let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
         if s:sql_file_{compl_type} != ""
             if filereadable(s:sql_file_{compl_type})
                 let compl_list = readfile(s:sql_file_{compl_type})
@@ -194,7 +202,9 @@
                 " endif
             endif
         endif
-    elseif compl_type == 'column'
+
+        let g:dbext_default_dict_show_owner = saved_dbext_show_owner
+    elseif compl_type =~? 'column'
 
         " This type of completion relies upon the dbext.vim plugin
         if s:SQLCCheck4dbext() == -1
@@ -209,33 +219,88 @@
             let base = s:save_prev_table
         endif
 
-        if base != ""
-            let compl_list        = s:SQLCGetColumns(base, '')
+        let owner  = ''
+        let column = ''
+
+        if base =~ '\.'
+            " Check if the owner/creator has been specified
+            let owner  = matchstr( base, '^\zs.*\ze\..*\..*' )
+            let table  = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' )
+            let column = matchstr( base, '.*\.\zs.*' )
+
+            " It is pretty well impossible to determine if the user
+            " has entered:
+            "    owner.table
+            "    table.column_prefix
+            " So there are a couple of things we can do to mitigate 
+            " this issue.
+            "    1.  Check if the dbext plugin has the option turned
+            "        on to even allow owners
+            "    2.  Based on 1, if the user is showing a table list
+            "        and the DrillIntoTable (using <C-Right>) then 
+            "        this will be owner.table.  In this case, we can
+            "        check to see the table.column exists in the 
+            "        cached table list.  If it does, then we have
+            "        determined the user has actually chosen 
+            "        owner.table, not table.column_prefix.
+            let found = -1
+            if g:omni_sql_include_owner == 1 && owner == ''
+                if filereadable(s:sql_file_table)
+                    let tbl_list = readfile(s:sql_file_table)
+                    let found    = index( tbl_list, ((table != '')?(table.'.'):'').column)
+                endif
+            endif
+            " If the table.column was found in the table list, we can safely assume
+            " the owner was not provided and shift the items appropriately.
+            " OR
+            " If the user has indicated not to use table owners at all and
+            " the base ends in a '.' we know they are not providing a column
+            " name, so we can shift the items appropriately.
+            if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$')
+                let owner  = table
+                let table  = column
+                let column = ''
+            endif
+        else
+            let table  = base
+        endif
+
+        " Get anything after the . and consider this the table name
+        " If an owner has been specified, then we must consider the 
+        " base to be a partial column name
+        " let base  = matchstr( base, '^\(.*\.\)\?\zs.*' )
+
+        if table != ""
             let s:save_prev_table = base
-            let base              = ''
-        endif
-    elseif compl_type == 'column_csv'
+            let list_type         = ''
 
-        " This type of completion relies upon the dbext.vim plugin
-        if s:SQLCCheck4dbext() == -1
-            return []
-        endif
+            if compl_type == 'column_csv'
+                " Return one array element, with a comma separated
+                " list of values instead of multiple array entries
+                " for each column in the table.
+                let list_type     = 'csv'
+            endif
 
-        if base == ""
-            " The last time we displayed a column list we stored
-            " the table name.  If the user selects a column list 
-            " without a table name of alias present, assume they want
-            " the previous column list displayed.
-            let base = s:save_prev_table
-        endif
+            let compl_list  = s:SQLCGetColumns(table, list_type)
+            if column != ''
+                " If no column prefix has been provided and the table
+                " name was provided, append it to each of the items
+                " returned.
+                let compl_list = map(compl_list, "table.'.'.v:val")
+                if owner != ''
+                    " If an owner has been provided append it to each of the
+                    " items returned.
+                    let compl_list = map(compl_list, "owner.'.'.v:val")
+                endif
+            else
+                let base = ''
+            endif
 
-        if base != ""
-            let compl_list        = s:SQLCGetColumns(base, 'csv')
-            let s:save_prev_table = base
-            " Join the column array into 1 single element array
-            " but make the columns column separated
-            let compl_list        = [join(compl_list, ', ')]
-            let base              = ''
+            if compl_type == 'column_csv'
+                " Join the column array into 1 single element array
+                " but make the columns column separated
+                let compl_list        = [join(compl_list, ', ')]
+            endif
         endif
     elseif compl_type == 'resetCache'
         " Reset all cached items
@@ -256,7 +321,7 @@
     if base != ''
         " Filter the list based on the first few characters the user
         " entered
-        let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "^'.base.'"'
+        let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
         let compl_list = filter(deepcopy(compl_list), expr)
     endif
 
@@ -274,6 +339,8 @@
     else
         let syn_group_arr = g:omni_sql_precache_syntax_groups
     endif
+    " For each group specified in the list, precache all
+    " the sytnax items.
     if !empty(syn_group_arr)
         for group_name in syn_group_arr
             call s:SQLCGetSyntaxList(group_name)
@@ -444,9 +511,23 @@
     return cols
 endfunction
 
+function! s:SQLCGetObjectOwner(object) 
+    " The owner regex matches a word at the start of the string which is
+    " followed by a dot, but doesn't include the dot in the result.
+    " ^    - from beginning of line
+    " "\?  - ignore any quotes
+    " \zs  - start the match now
+    " \w\+ - get owner name
+    " \ze  - end the match
+    " "\?  - ignore any quotes
+    " \.   - must by followed by a .
+    let owner = matchstr( a:object, '^"\?\zs\w\+\ze"\?\.' )
+    return owner
+endfunction 
+
 function! s:SQLCGetColumns(table_name, list_type)
-    let table_name   = matchstr(a:table_name, '^\w\+')
-    let table_name   = matchstr(a:table_name, '^[a-zA-Z0-9_.]\+')
+    " Check if the table name was provided as part of the column name
+    let table_name   = matchstr(a:table_name, '^[a-zA-Z0-9_]\+\ze\.\?')
     let table_cols   = []
     let table_alias  = ''
     let move_to_top  = 1
