Hi
I need to do a query to retrieve the entry_id and weblog_id based on the title which comes from a loop and is stored in a php variable.
The query does not return any results, what I am doing wrong????
here is my code:
$rel_art_array = explode ("<br />", "{embed:Rel_Art}");
if ($rel_art_array !="") {
for ($i = 0; $i <count($rel_art_array); $i++){
$relation = $rel_art_array[$i];
echo $relation;
?>
{exp:query sql="SELECT entry_id, weblog_id FROM exp_weblog_titles WHERE title ='<?php echo $relation; ?>' "}
{entry_id}<br />
{/exp:query}
<?php
}
}
?>
Thanks in advance ![]()
