Discussion » Mysql Problem, Anyone?

This is a read-only copy. The forum ran on iamcal.com from 2000 until its database was lost in 2016, and this topic was rebuilt from copies saved by the Internet Archive's Wayback Machine. Some replies may be missing.
Posted by JohnM, 22:08, 15th April 2001:
 
if ($datastuff['showflag']==1) {
Posted by Jeremy, 22:08, 15th April 2001:
 
why does the if test in this code generate an error!? Warning: Use of undefined constant - assumed 'showflag'$link=mysql_pconnect mysql_select_db("Guestbook") or die(mysql_error())("localhost","root","foo")
Posted by Jeremy, 03:03, 16th April 2001:
 
assumed 'showflag'why can't i take a hint.what a dork.anyways. why would $datastuff[showflag] work in a print statement w/out errors but not in a test?
Posted by cal, 09:00, 17th April 2001:
 
because it needs to be quoted or implied as quoted. it wants quotes whenever it can get them (barewords are bad) but adding quotes inside a quotish string would break the string or at least would need a better (and slower) parser.