The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> mySQL BETWEEN, Not inclusive
Dag
post Sep 22 2014, 03:55 AM
Post #1


Advanced Member
****

Group: Members
Posts: 107
Joined: 24-October 06
Member No.: 549



Why operator BETWEEN doesn't return the last data group?
CODE

    $sql = "SELECT * FROM $tbl WHERE `data` BETWEEN 'R' and 'Z'";

Z data are not loaded. If I use NOT BETWEEN A and R - then I see them.

Means, first letter IS included and last NOT.

Thanks in advance.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Dag
post Sep 26 2014, 12:27 PM
Post #2


Advanced Member
****

Group: Members
Posts: 107
Joined: 24-October 06
Member No.: 549



Back to subject. We are not talking about local rules but about multilingual / international DB and sorting way. I'll not learn each single language or countri rulez to push something to work on the propper way. A after Z - it's ok if u are working in DK and making their local DB. But if u r doing that what I am doing (and not only me), then each variation of A with any diacritical mark will be before Z smile.gif)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
Dag   mySQL BETWEEN   Sep 22 2014, 03:55 AM
Christian J   Is a DB row called exactly "Z" returned ...   Sep 22 2014, 05:54 AM
Dag   Sure Christian. Zdravko, Zlatko... Imagine: when...   Sep 23 2014, 01:16 PM
Christian J   Is a DB row called exactly "Z" returned...   Sep 24 2014, 11:04 AM
jimlongo   Normally SQL BETWEEN returns up to Z, but not Z+ i...   Sep 24 2014, 09:28 AM
Christian J   Normally SQL BETWEEN returns up to Z, but not Z+ ...   Sep 24 2014, 11:04 AM
Dag   Thank you guys. Exactly! I've added perfo...   Sep 24 2014, 03:00 PM
Christian J   What is another solution? Like? How about just c...   Sep 24 2014, 04:27 PM
Dag   Explain. Too much select case or if... making slow...   Sep 24 2014, 05:15 PM
Brian Chandler   Explain. Too much select case or if... making slo...   Sep 25 2014, 01:49 AM
Christian J   Explain. Too much select case or if... making slo...   Sep 25 2014, 04:24 AM
jimlongo   How about adding to the query behind the scenes. ...   Sep 24 2014, 03:13 PM
Dag   For B and F, instead the B and G, B and Fz did the...   Sep 24 2014, 03:18 PM
Christian J   or in the case of Z Zzzzzzzzzzz like you suggeste...   Sep 24 2014, 04:21 PM
jimlongo   I'm no dbadmin expert, but I think if it's...   Sep 24 2014, 03:22 PM
Dag   SELECT * FROM $tbl WHERE LEFT('data...   Sep 25 2014, 01:10 PM
Christian J   Å Ä and Ö and other umlauds and graves... This...   Sep 25 2014, 02:28 PM
Dag   :: No, the Swedish(*) letter Å sounds more like t...   Sep 26 2014, 04:14 AM
Christian J   for visual perception, Aage (pronounced Oge) woul...   Sep 26 2014, 07:17 AM
Dag   Back to subject. We are not talking about local ru...   Sep 26 2014, 12:27 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th April 2024 - 02:42 AM