Re: Why won't this query go through?

From: Date: Mon, 12 Mar 2007 23:11:28 +0000
Subject: Re: Why won't this query go through?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-250346@lists.php.net to get a copy of this message
On Sun, March 11, 2007 11:24 am, Mike Shanley wrote: > I am just not understanding what I could have possibly done wrong with > this query. All of the variables are good, without special characters > in > any sense of the word... So why isn't it importing anything? > > Thanks! > > $q = "INSERT INTO > visitors(username,ÌÅ^˜ > ±÷W©¶½~M’�password,email,firstname,lastname,birthdate,verifythis) > VALUES ('".$username."', > '".md5($password1)."', > '".$email."', > '".$firstname."', > '".$lastname."', > '".$birthdate."', > '".$verifythis."');"; > mysql_query($q); I don't know. But MySQL is just DYING to TELL you what went wrong. mysql_query($q) or die(mysql_error()); is what you should be using. For now. Later, you'll want a better error handling method than "or die()" -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#250346) next »