See who else is going to make these two mistakes????

Source: Internet
Author: User
The first JS question


Do you think that's the right wording? Think right please run the program look, Wahaha.

A second database issue.
Data Table name product
ID Int (4)
Name varchar (20);
Price text

There are 2 records
ID Name Price
1 TV 750.00
2 Air Conditioning 5000

Sort by price high and low
Write SQL statements
SELECT * from Product ORDER BY price DESC

Think right please run to see that


Reply to discussion (solution)

has been very concerned about the landlord.

First, I don't store the Price field in text, so there's no such error.

has been very concerned about the landlord. Pay attention to what I do

The first JS question



Do you think that's the right wording? Think right please run the program look, Wahaha.

A second database issue.
Data Table name product
ID Int (4)
Name varchar (20);
Price text

There are 2 records
ID Name Price
1 TV 750.00
2 Air Conditioning 5000

Sort by price high and low
Write SQL statements
SELECT * from Product ORDER BY price DESC

Think right please run to see that

The first is clearly the price also to go regular replacement, and the price is better than the habit is to become a digital contrast.
I don't think "who would make these two mistakes", but "who would write this code".

The first one is typed in the text box,
For example, I can enter 5000, so many spaces behind.

The second price is a fixed one.


The first JS question



Do you think that's the right wording? Think right please run the program look, Wahaha.

A second database issue.
Data Table name product
ID Int (4)
Name varchar (20);
Price text

There are 2 records
ID Name Price
1 TV 750.00
2 Air Conditioning 5000

Sort by price high and low
Write SQL statements
SELECT * from Product ORDER BY price DESC

Think right please run to see that

The first is clearly the price also to go regular replacement, and the price is better than the habit is to become a digital contrast.
I don't think "who would make these two mistakes", but "who would write this code".

if ($$ ("bid"). Value.replace (/^\s+/, ""). Replace (/\s+$/, "") <$$ ("Reserve_price"). Value)
should be for
if (Parsefloat ($$ ("bid"). Value)

SELECT * from Product ORDER BY price DESC
should be for
SELECT * FROM Product ORDER BY price+0 DESC
or change price to DECIMAL type

Then there is. Replace (/^\s+/, ""). Replace (/\s+$/, "") is too weird.
. replace (/^\s+|\s+$/g, "")

Then there is. Replace (/^\s+/, ""). Replace (/\s+$/, "") is too weird.
. replace (/^\s+|\s+$/g, "")
I've been looking for it on the Internet before, and I've been using it.

First, I don't store the Price field in text, so there's no such error.
This error is due to the use of some CMS system, the background to establish data fields, due to no special settings, default Text,so ...


has been very concerned about the landlord. Pay attention to what I do
Your: Youyax Open source Forum



has been very concerned about the landlord. Pay attention to what I do
Your: Youyax Open source Forum
Hey, csdn revised it? I suddenly felt that Csdn's citation effect was a little imitating my design,
It's not like that before.

Oh

It is impossible to make such a mistake. How could price be text?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.