I am writing a php mysql application and I was running the following select query:
SELECT
individual_marriage.pk_marriage_ID,
husband.individual_person_FirstName,
husband.individual_person_LastName,
wife.individual_person_FirstName,
wife.individual_person_LastName
FROM
(
(
individual_marriage AS im
INNER JOIN person AS husband ON
individual_marriage.fk_IndividualID_male=husband.pk_person
)
INNER JOIN person AS wife ON individual_marriage.fk_IndividualID_female=wife.pk_person
)
WHERE
im.Sec5A_applicable='yes'
The problem lies somewhere in the WHERE statement and the mysqli_query returns false. mysql_errno() and mysql_error() is also returning blank somehow.
We can help more if you could post the
SCHEMAof your table. If you run this query and return blank rows, it means that there are columns in theindividual_marriagethat are not in the tablepersonand because you are also using INNER JOIN.UPDATE