/* В $ selected m получение данных из java-кода, который успешно сохраняется в $ selected. Использование $ selected в запросе, но не может получить данные после запуска запроса. */SQL внутренний запрос, не выдающий вывод
$selected = $_GET['selected'];
$projects=mysql_query("select ProjectName from projects where LobID =
(select LobID from lob where LobName like ".$selected.");");
if (!$projects) {
echo "Could not successfully run query ($projects) from DB: " .mysql_error();
exit;
}
/* Have included this query in my php page. All the table names are same.Lob and projects are two different tables n LobID is primary key in Lob & Foreign key in projects. By executing the above query I am not able to fetch the data in $projects.Instead i am getting mesagecould not successfully run query. please help. */
У меня есть обновленный ответ –