RON_ron Posted October 5, 2009 Share Posted October 5, 2009 <?php $link = mysql_connect("localhost","inmy","inmypasw01"); mysql_select_db("inmy_dyomails"); $query = 'SELECT * FROM dyomails'; $results = mysql_query($query); echo "<?xml version=\"1.0\"?>\n"; echo "<dyomails>\n"; // I want to match this number to an ID on the MySQL. Is the syntax ok? $SomeVar = "APXI12345611"; $query = "SELECT * FROM dyomails WHERE ID = '$SomeVar'"; $results = mysql_query($query); if($line = mysql_fetch_assoc($results)) { echo = "<item>" . $line["Email"] . "</item>\n"; } echo "</dyomails>\n"; mysql_close($link); ?> Quote Link to comment https://forums.phpfreaks.com/topic/176596-number-match/ Share on other sites More sharing options...
cags Posted October 5, 2009 Share Posted October 5, 2009 Yes. Quote Link to comment https://forums.phpfreaks.com/topic/176596-number-match/#findComment-931014 Share on other sites More sharing options...
Maq Posted October 5, 2009 Share Posted October 5, 2009 What leads you to ask this question? Quote Link to comment https://forums.phpfreaks.com/topic/176596-number-match/#findComment-931016 Share on other sites More sharing options...
.josh Posted October 5, 2009 Share Posted October 5, 2009 never ceases to amaze me how many "is this code okay" questions we get. Why not press the GO button and find out? Quote Link to comment https://forums.phpfreaks.com/topic/176596-number-match/#findComment-931106 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.