I have two table for category name and post. Now i need to show category name for each post like this :
$joinedcontent = Access::FETCH("SELECT * FROM " . CONTENT .
" LEFT JOIN " . POST . " ON category = id WHERE id = ?", $row['id']);
$ccats= $joinedcontent[0]['name'];
In result i see this error:
Error: Column 'id' in where clause is ambiguous
Statement: SELECT * FROM cms_content LEFT JOIN cms_posts ON type = id WHERE id = ?
Arguments:
Array
(
[۰] => 30
)
how do fix this error?