Jump to content

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


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?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.