SunQuest
           PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
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  
Old September 18th, 2002, 01:10 PM
jonpress jonpress is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 9 jonpress User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to jonpress
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?

Reply With Quote
  #2  
Old September 18th, 2002, 05:11 PM
brut brut is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 367 brut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 30 sec
Reputation Power: 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")) {

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > How to express a SQL null return as a form requirement?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway