Ask a Question related to ASP, Design and Development.
-
Bill #1
conditional sql statements
I have a shopping cart that I want to load items in that come from a
huge scrolling form. In other words, when someone clicks on a category
in our site, it scrolls out all the items in that category, maybe 30
or more. I have text boxes next to each item so somone can enter a
number, then press submit form button at the bottom of the form, and
send those slections to the shopping cart.
The problem is, many of the text boxes are empty, yet they are still
being sent to the shopping cart as a quatity of 0. Is there a way for
sql to ignore a value if the variable is zero, or only get the sql
statement to run if a variable is > 0?
Thanks,
Bill
Bill Guest
-
If statements in PHP?
How do i get something to show only if the user is logged in? For example, "log out" should only show if the user is logged in and "log in" should... -
Conditional Statements in CDONTS
Hi, I have CDONTS working great but have a small problem. There is a question with a checkbox as answer in the form that generates the email. If... -
Conditional sum?
FMP6, MacOSX.2 I've created a calc field using the aggregate Sum(score) to give me a "total points scored" for all related records in a... -
"OR" statements allowed in MultipleIf conditional regions in templates?
Does DMX allow the addition of an "OR" condition on a MultipleIf conditional region: Thus displaying the same output for two different conditions? ... -
If/else statements - help.
Sorry to post so much code all at once but I'm banging my head against the wall trying to get this to work! Does anyone have any idea where I'm... -
Ray at #2
Re: conditional sql statements
Post your code. [empty] <> 0 unless you cint() it, or unless in your DB,
you have a default value of 0. I don't know how your building your query,
but it sounds like you may want to change it so that it only inserts values
for columns that values were sent for from your form.
Ray at work
"Bill" <billzimmerman@gospellight.com> wrote in message
news:8da5f4f4.0308291041.251d621e@posting.google.c om...> I have a shopping cart that I want to load items in that come from a
> huge scrolling form. In other words, when someone clicks on a category
> in our site, it scrolls out all the items in that category, maybe 30
> or more. I have text boxes next to each item so somone can enter a
> number, then press submit form button at the bottom of the form, and
> send those slections to the shopping cart.
>
> The problem is, many of the text boxes are empty, yet they are still
> being sent to the shopping cart as a quatity of 0. Is there a way for
> sql to ignore a value if the variable is zero, or only get the sql
> statement to run if a variable is > 0?
>
> Thanks,
>
> Bill
Ray at Guest
-
Mike Florio #3
Re: conditional sql statements
I would recommend checking the fields in the submitted form for "" (or "0"),
and construct a sql query on the fly that you call at the end.
"Bill" <billzimmerman@gospellight.com> wrote in message
news:8da5f4f4.0308291041.251d621e@posting.google.c om...> I have a shopping cart that I want to load items in that come from a
> huge scrolling form. In other words, when someone clicks on a category
> in our site, it scrolls out all the items in that category, maybe 30
> or more. I have text boxes next to each item so somone can enter a
> number, then press submit form button at the bottom of the form, and
> send those slections to the shopping cart.
>
> The problem is, many of the text boxes are empty, yet they are still
> being sent to the shopping cart as a quatity of 0. Is there a way for
> sql to ignore a value if the variable is zero, or only get the sql
> statement to run if a variable is > 0?
>
> Thanks,
>
> Bill
Mike Florio Guest



Reply With Quote

