[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2238] trunk/sql/modules/Location.sql



Revision: 2238
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2238&view=rev
Author:   einhverfr
Date:     2008-08-06 23:35:23 +0000 (Wed, 06 Aug 2008)

Log Message:
-----------
Correcting location saving issues

Modified Paths:
--------------
    trunk/sql/modules/Location.sql

Modified: trunk/sql/modules/Location.sql
===================================================================
--- trunk/sql/modules/Location.sql	2008-08-06 23:33:47 UTC (rev 2237)
+++ trunk/sql/modules/Location.sql	2008-08-06 23:35:23 UTC (rev 2238)
@@ -38,11 +38,11 @@
 	
 	SELECT * INTO location_row FROM location
 	WHERE line_one = in_address1 AND
-		line_two = in_address2 AND
-		line_three = in_address3 AND
+		coalesce(line_two, '') = coalesce(in_address2, '') AND
+		coalesce(line_three, '') = coalesce(in_address3, '') AND
 		city = in_city AND
-		state = in_state AND
-		mail_code = in_zipcode AND
+		coalesce(state, '') = coalesce(in_state, '') AND
+		coalesce(mail_code, '') = coalesce(in_zipcode, '') AND
 		country_id = in_country
 	LIMIT 1;
 	IF FOUND THEN


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.