Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Wood_Exalted
Starting Member
2 Posts |
Posted - 2011-10-05 : 08:28:18
|
| Hi, I've got a little sql problem at my hands :)SELECT f.*, t.*, u.username FROM ".TABLE_PREFIX."forums f, ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid) WHERE f.fid = t.fid AND 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%' ORDER BY t.lastpost DESC Is giving me this error;SQL Error: 1052 - Column 'fid' in where clause is ambiguousI think it's because the sql can't identify my 'fid', but I am not skilled enough to get this right. :) The weird thing is that it works until I log out of my forum, after that it's giving this error constant.Any help on solving my problem here would be super appreciated. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-05 : 08:32:32
|
| I dont think its MS SQL Server code. This is MS SQL Server forum. So unless you're using SQL Server you may be better off posting it in relevant forum------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Wood_Exalted
Starting Member
2 Posts |
Posted - 2011-10-05 : 08:39:34
|
| Oh, you are right, my apologies! :)Posted in "New to SQL Server Programming", it never occured to me there where several versions :) |
 |
|
|
|
|
|