Simon, If the query is returning no rows, my guess would be trailing spaces in the data. This has been discussed at length and there is a new collating sequence (http://www.sqlite.org/cvstrac/chngview?cn=4732)to address it. Either use it or try saying: WHERE rtrim(tblusers.company) = rtrim(tblcompany.company)
- Jeff -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johnstone, Simon Sent: Monday, February 11, 2008 11:11 AM To: sqlite-users@sqlite.org Subject: [sqlite] Join trouble I am having serious trouble creating a join on my database. I have tested it in other databases and it works so it must be a problem with sqlite and the join??? I don't know but am really struggling. $query = "SELECT name, username, currency, company, salescontact, orders2006, orders2007, sales2006, sales2007, company FROM tblusers, tblcompany WHERE tblusers.company = tblcompany.company"; The page loads up but there is just no data from the database, if I use any of the databases on their own they work fine its only when I join them Cheers for any help Simon Johnstone Customer Service Data Officer Tel + 44 (0) 1484 465 500 Ext 5154 Fax: +44 (0) 1484 465 586 E-mail [EMAIL PROTECTED] <blocked::mailto:[EMAIL PROTECTED]> Web: www.davidbrown.com <blocked::http://www.davidbrown.com/> David Brown Engineering Limited Company No 331925 England Park Works, Park Road, Huddersfield HD4 5DD England _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users