$sql = "SELECT *
FROM Table1, Table2
WHERE Table1.ParameterX = Table2.ParameterX
AND Table1.ParameterX='A'";
Printing this out only shows the FK value from the main table instead of the full value from table 2.
Also is there a better altenative to the "SELECT *" as that would be prone to downgrading as the contents of the DB increased.
Cheers
Use limit to select 10 to display, always make sure you are using your queries to the utmost and leave less work for your scripts. If you have the script do all of the sorting and selecting of data you are increasing the workload exponentially. Mysql can do most of the work for you.
<added>Welcome to WebmasterWorld [webmasterworld.com] mrgym
You can use
$q = "SELECT table1.field1, table2.field1
FROM table1,table2
WHERE table1.field2 = table2.field2";
Instead of calling all fields with * - I'm not sure of the time savings using this method but I'm under the impression (rightly or wrongly) it will reduce query times.
As long as the field names are different in the two tables you can call your values after fetching the array with $array["fieldname"]
Cheers!
GB