Some simple PHP and MySQL Q's
Posted: Mon Jun 01, 2009 2:36 pm
Hi all,
These are some really simple Q's for PHP and MySQL, but I can't seem to find any references off Google that'll give me a definitive y/n answer.
PHP Q: Basically here I'm trying to pass an e-mail address using the cleartext URL form get() method, i.e. http://mydomain.com/myPHPscript.php?email=passed_email. The question here is will the special character @ inside an email address create any confusion when using get()?
MySQL Q: This question is regarding the SELECT function, i.e. SELECT * FROM mytable WHERE some_parameter. The question here is what are SELECT's return values? I've Googled the crap out of this one, and it seems it either returns the row information that matches the WHERE critera, or it returns FALSE if the query is invalid - however, all examples that I've found of the invalid query have been syntaxtical, meaning that if mytable didn't exist or some other WHERE parameter was messed up, it'd return FALSE. What happens if all parameters are correct but nothing was found, does it return NULL?
Thanks,
card
These are some really simple Q's for PHP and MySQL, but I can't seem to find any references off Google that'll give me a definitive y/n answer.
PHP Q: Basically here I'm trying to pass an e-mail address using the cleartext URL form get() method, i.e. http://mydomain.com/myPHPscript.php?email=passed_email. The question here is will the special character @ inside an email address create any confusion when using get()?
MySQL Q: This question is regarding the SELECT function, i.e. SELECT * FROM mytable WHERE some_parameter. The question here is what are SELECT's return values? I've Googled the crap out of this one, and it seems it either returns the row information that matches the WHERE critera, or it returns FALSE if the query is invalid - however, all examples that I've found of the invalid query have been syntaxtical, meaning that if mytable didn't exist or some other WHERE parameter was messed up, it'd return FALSE. What happens if all parameters are correct but nothing was found, does it return NULL?
Thanks,
card