A JM Posted August 31, 2009 Share Posted August 31, 2009 How do I write a SELECT query using a variable echoed from another query, <?php echo $row_rstreviewclaims['num']; ?> I tried the following with no luck - I can't get the syntax correct... $query_rstcomments = "SELECT comment FROM comments WHERE num = " <?php $row_rstreviewclaims['num']; ?>; Any help would be appreciated. Thanks. A JM, Quote Link to comment Share on other sites More sharing options...
avvllvva Posted August 31, 2009 Share Posted August 31, 2009 $query_rstcomments = "SELECT comment FROM comments WHERE num = '".$row_rstreviewclaims['num']."'"; Quote Link to comment Share on other sites More sharing options...
A JM Posted August 31, 2009 Author Share Posted August 31, 2009 Many thanks. A JM, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.