Hi i have sql query result stored in the database.I have to check if any row contains string 'N;' then the next sql statement should execute.I have many such strings thats why want to execute my next sql statement.I have tried following code but when i try to run the code it goes to infinite loop.Thank you. Here is my php code:
while ($row = mysql_fetch_assoc($result)) {
$config= $row['configuration'];
if($config=='N;')
{
$sql="SELECT DISTINCT ad_news_texte.id, ad_news_texte.headline, ad_news.datum_archiv FROM autodo.ad_news_texte INNER JOIN autodo.ad_news_oe ON ad_news_texte.news_id = ad_news_oe.id_ad_news INNER JOIN autodo.ad_news ON ad_news_oe.id_ad_news = ad_news.id WHERE ad_news.datum_archiv BETWEEN curdate( ) - INTERVAL DAYOFWEEK( curdate( ) ) +28 DAY AND curdate( )";
$result = mysql_query($query, $myConnection);
}
else{
$html .= '<table id="news">
<a href="news.php?id=">
<p class="welcome-subheadline"> '. $config .'</p></a>
</table>';
}
}