|
Posted by Rik on 10/20/06 03:19
Garry Jones wrote:
> DUH!
>
> Ok, I am starting to grasp this now.
>
> A little bit nearer since my last effort.
>
> $ml_collect='SELECT * FROM ml_lopp LEFT JOIN scfmforening.scfmfor ON
> ml_lopp.scfmnum = scfmforening.scfmnum ORDER BY loppnmn';
> $ml_upg=mysql_query($ml_collect);
> $num_ml=mysql_numrows($ml_upg);
>
> But that is misfiring and not picking up any rows.
>
> Can you see why?
First of all, don't use SELECT *, use the actual fieldnames you want.
Second of all is that you JOIN a table, not a table field.
If I understand your table fields correctly:
SELECT x.`scfmnum`,y.`loppnmn`
FROM `ml_lopp` x
LEFT JOIN `scfmforening` y
ON x.`scfmnum` = y.`scfmnum`
ORDER BY x.`loppnmn`
Grtz,
--
Rik Wasmus
[Back to original message]
|