Forum Moderators: coopster
Im stumped, i have tried everything and the nearest i can get is a ambiguity error message.
Basically, without pasting loads of code.
Page 1 get a ID to search for. This is sent to the next page in a function, lets call this function F1.
I want to display the contents of field ID, User of table Fault and field Status of table FaultAction, where ID = F1.
ID is the Pkey of both tables.
---Edit---
("SELECT FaultID, ReporterUsername, FaultType, Status
FROM fault, faultaction
WHERE $searchList = '".$frm_search."'
AND fault.FaultID = faultaction.FaultID")or
die(mysql_error());
It combines the tables, but now it doesn't actually filter the search.
When u put say 31 in the search. It outputs all the records in the talbe (regardless whether they match the criteria or not) and also displays in the FaultID columm, 31 for every record.
WHEREclause may be giving you issues. You are asking your query to compare the form value to a variable, but we don't know what that variable is...
WHERE $searchList = '".$frm_search."'
You may want to have a look at the PHP Troubleshooting Tips in the PHP Forum Library [webmasterworld.com] for some troubleshooting concepts. Messages 1 and 3 [webmasterworld.com] may help you with your SQL issues.