I dont know what is the problem with this query. It seems very fine to me.
select o.id, p.date, u.billingName, u.billingPhone, u.billingCompany,
u.billingAddress, u.billingCity, u.billingState, u.billingCountry,
u.billingZip, u.shippingName, u.shippingPhone, u.shippingCompany,
u.shippingAddress, u.shippingCity, u.shippingState, u.shippingCountry,
u.shippingZip, o.layer, o.boardSizeWidth,o.boardSizeHeight, o.quantity
from order o, purchase p, useraccount u
where p.id = 1 and o.id = p.OrderId and u.id = p.UserId
Error : #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order o, purchase p, useraccount u where p.id = 1 and o.id = p.OrderId and u.id ' at line 1