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); ?> 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. 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? 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? Link to comment https://forums.phpfreaks.com/topic/176596-number-match/#findComment-931106 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.