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, Link to comment https://forums.phpfreaks.com/topic/172553-solved-select-query-using-echoed-record-field/ 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']."'"; Link to comment https://forums.phpfreaks.com/topic/172553-solved-select-query-using-echoed-record-field/#findComment-909606 Share on other sites More sharing options...
A JM Posted August 31, 2009 Author Share Posted August 31, 2009 Many thanks. A JM, Link to comment https://forums.phpfreaks.com/topic/172553-solved-select-query-using-echoed-record-field/#findComment-909607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.