I have a query that looks like this, plus I'll show you the PHP right after it...
$sql = "SELECT s.f_name, s.l_name, u.f_name, u.l_name
FROM src_main s INNER JOIN users u ON s.emp_id = u.emp_id";
$result = mysql_query($sql);
$my_source = mysql_fetch_array($result); stripslashes_array( $my_source );
$my_array_count = count( $my_source );
Question (1)
How do I access the results from this query? I tried this:
$my_source[s.f_name]
See, there is an f_name in each of the tables being joined, BUT they are not the same. So I need to be able to refer to each one by the table they are coming from, thus I prefixed the variable with the table name from the query but this does not work.
I hope this makes sense... Thanks in advance.