brown2005 Posted November 19, 2009 Share Posted November 19, 2009 how do you write the subject in the correct php. thanks Link to comment https://forums.phpfreaks.com/topic/182169-select-from-emails-where-emails_id-start-to-end/ Share on other sites More sharing options...
JonnoTheDev Posted November 19, 2009 Share Posted November 19, 2009 <?php $result = mysql_query("SELECT * FROM emails WHERE emails_id >= '".$start."' AND emails_id <= '".$end."'"); ?> Link to comment https://forums.phpfreaks.com/topic/182169-select-from-emails-where-emails_id-start-to-end/#findComment-961137 Share on other sites More sharing options...
Maq Posted November 19, 2009 Share Posted November 19, 2009 Alternatively, you can use BETWEEN. Also, if you are placing this query into a string with double quotes, variables will be interpolated. ie: $query = "SELECT * FROM emails WHERE emails_id BETWEEN $start AND $end"; Link to comment https://forums.phpfreaks.com/topic/182169-select-from-emails-where-emails_id-start-to-end/#findComment-961157 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.