|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
How to express a SQL null return as a form requirement?
I am processing a form, provided it meets multiple requirements. I am checking a SQL database query, if it is null, I want the form to process.
Here is the query: $query = mysql_query("SELECT Make, Description FROM somesqldatabase WHERE Description LIKE '$Description'"); while ($row = mysql_fetch_array($query)){ echo("<p>Here is $row["Make"] and $row["Description"]<p>"); } Here is the form portion that specifies the requirements: if ("SUBMIT" == $submitform && $row==NULL && $Email == $EmailRetype && $my_form->validate_fields("Make, Description")) { The $row=NULL portion is hanging things up, I tried $row==0, and different other ways of expressing that "Description does not exist in the database" (already). Any ideas? |
|
#2
|
|||
|
|||
|
RE: How to express a SQL null return as a form requirement?
Try this:
Code:
if ("SUBMIT" == $submitform && is_null($row) && $Email == $EmailRetype && $my_form->validate_fields("Make, Description")) {
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > How to express a SQL null return as a form requirement? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|