Jump to content

mysql query failed: Column 'link_id' in where clause is ambiguous


cosmicsea

Recommended Posts

I am using a script I found online tow work with sphinx fulltext search engine and it works fine but when I try to select multiple tables i get this error

mysql query failed: Column 'link_id' in where clause is ambiguous

 

$CONF['mysql_query'] = '
SELECT links.link_id AS id, links.title AS title, links.url AS url, links.fulltxt AS body, media.link_id, media.media_id AS m_id, media.title AS title, media.thumb_link AS t_link
FROM links, media
WHERE link_id IN ($ids)
';

 

I am just trying to be able to fetch results from both tables and this is the default sql for the script but i tried to make it select 2 tables instead of one. I need to display thumbnails for every specific link. Any idea what I should change this query to?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.