Home > database >  Sql statements in the query table version number biggest problems
Sql statements in the query table version number biggest problems

Time:09-26

The Field Type Collation Null Key Default Extra Privileges Comment
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
V_id int (11) (NULL) NO PRI (NULL) select, insert, update, the references
V_newversion varchar (32) utf8_general_ci NO (NULL) select, insert, update, the references version
Utf8_general_ci v_url varchar (1024) NO (NULL) select, insert, update, the references to update url
V_description varchar (1024) utf8_general_ci YES (NULL) select, insert, update, references to update the content
V_date date (NULL) YES (NULL) select, insert, update, references to update the time
V_type varchar (32) utf8_general_ci YES (NULL) select, insert, update, references (1: android, 2: ios)
V_forceupdate int (1) (NULL) YES 0 select, insert, update, references to enforce update (by default, 0 is not forced to update 1 mandatory update)
V_site int (10) (NULL) YES (NULL) select, insert, update, the references


Table structure is that the version number is 1.0.0 1.0.1 and so on; Query found 1.0.10, maximum can only detect 1.0.9.

SQL: SELECT MAX (bean. ` v_newversion `) FROM cms_version bean

Inquire about how change can be normal query, thank you!

* * * * * * * * * * * * * * * * * * * * * update * * * * * * * * * * * * * * * * * * * * * * * * * * *

I know because I was using a varchar type, 1 and 9, all is 9 big,

I want to ask my SQL how should change?

CodePudding user response:

Does anyone help me to check a lot doesn't work

CodePudding user response:

The SELECT parsename (v_newversion, 3),
Parsename (v_newversion, 2),
Parsename (v_newversion, 1)
V_newversion
ROM cms_version
The Order by
Parsename (v_newversion, 3),
Parsename (v_newversion, 2),
Parsename (v_newversion, 1)

CodePudding user response:

refer to the second floor of gypsy song response:
SELECT parsename (v_newversion, 3),
Parsename (v_newversion, 2),
Parsename (v_newversion, 1)
V_newversion
ROM cms_version
The Order by
Parsename (v_newversion, 3),
Parsename (v_newversion, 2),
Parsename v_newversion, (1)


Bosses, I use the SQL prompt, FUNCTION xj - RMT. Parsename does not exist, don't quite understand why didn't this FUNCTION
  • Related