Good day! I have 3 tables name property, personal and spouse, they have all the same id. I want to join the 3 of them, I had already join property and personal table but I can't join the spouse table.

$userquery = mysql_query("SELECT * FROM property, personal WHERE") or die ("The query could not be completed.");
FROM   property, 

If the are columns with the same name, for example id, when using the wildcard character the database will return error 1052:

Solution is to define each column:

SELECT,, FROM property JOIN personal ON = JOIN spouse ON =;

As explained in the linked documentation above. Read also:

By the way do not use the MySQL API (mysql_query() & co.) switch to MySQLi or PDO:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.