jim.davidson Posted April 3, 2007 Share Posted April 3, 2007 OOps forgot, I'm running mySql ver 4.1.21 I'm running this through dreamweaver I get this error but don't see the problem Parse error: parse error, unexpected T_STRING If I remove this section of code, I have no problem mysql_select_db($database_imcrecycle, $imcrecycle); $query_getCustomerId = "SELECT customers.customer_id FROM customers WHERE customers.state_id="ZZ""; $getCustomerId = mysql_query($query_getCustomerId, $imcrecycle) or die(mysql_error()); $row_getCustomerId = mysql_fetch_assoc($getCustomerId); $totalRows_getCustomerId = mysql_num_rows($getCustomerId); Another thing, why can't I see an earlier post of mine. I posted a question about an hour and a half ago and I can't find it? Quote Link to comment Share on other sites More sharing options...
Wildbug Posted April 3, 2007 Share Posted April 3, 2007 You need to escape the double quotes within the double quotes. $query_getCustomerId = "SELECT customers.customer_id FROM customers WHERE customers.state_id="ZZ""; ...should be either... $query_getCustomerId = "SELECT customers.customer_id FROM customers WHERE customers.state_id=\"ZZ\""; // escaped double quotes ...or... $query_getCustomerId = "SELECT customers.customer_id FROM customers WHERE customers.state_id='ZZ'"; // single quotes ...or even... $query_getCustomerId = 'SELECT customers.customer_id FROM customers WHERE customers.state_id="ZZ"'; (Your other post is in PHP Help.) Quote Link to comment Share on other sites More sharing options...
jim.davidson Posted April 3, 2007 Author Share Posted April 3, 2007 Thank you I thought I was going nuts, when I couldn't see my other post. It's been a very frustrating morning. Thanks again I'll try your suggestions 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.