Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Принадлежность поля интервалу.
|
|||
|---|---|---|---|
|
#18+
Подскажите пожалуйста как облегчить себе жизнь. Имеется таблица, я делаю запрос по определенному условие. Условие это равенство поля book определенным значениям. ну грубо говоря условие следующее: kart.book=1.or.2.or.3.or.5.or.33.or.34.or. и т.д. Можно ли к примеру задать один раз массив например bookm или что-нибудь ещё и одним условием проверить равно ли значение поля какому нибудь условию из массива? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.10.2004, 10:29 |
|
||
|
Принадлежность поля интервалу.
|
|||
|---|---|---|---|
|
#18+
pauleПодскажите пожалуйста как облегчить себе жизнь. Имеется таблица, я делаю запрос по определенному условие. Условие это равенство поля book определенным значениям. ну грубо говоря условие следующее: kart.book=1.or.2.or.3.or.5.or.33.or.34.or. и т.д. Можно ли к примеру задать один раз массив например bookm или что-нибудь ещё и одним условием проверить равно ли значение поля какому нибудь условию из массива? Вообще-то в Фоксе есть функция inlist() (при задании конкретных значений), а есть также функция ascan() осуществляющая поиск в массиве... Определись, что тебе надо и пользуйся... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.10.2004, 10:44 |
|
||
|
Принадлежность поля интервалу.
|
|||
|---|---|---|---|
|
#18+
1) InList(kart.book,1,2,3,4,5) 2) SELECT * FROM kart WHERE kart.book IN (1,2,3,4,5) Количество параметров в списке зависит от версии FoxPro. Для VFP6 до 24 значений. В случае превышения, разбивай на несколько списков (InList(kart.book,1,2,3,4,5,...,23) OR InList(kart.book,24,25,...)) Если есть таблица со списком допустимых значений, то можно так: SELECT * FROM kart WHERE kart.book IN (SELECT nValue FROM TabList) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.10.2004, 10:47 |
|
||
|
Принадлежность поля интервалу.
|
|||
|---|---|---|---|
|
#18+
у меня fox 2.5 функцию ascan() найти в справке не могу :(( inlist() - т.к. значения не постоянно одни и теже придется туда вписывать. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.10.2004, 10:49 |
|
||
|
Принадлежность поля интервалу.
|
|||
|---|---|---|---|
|
#18+
>функцию ascan() найти в справке не могу :(( " - Ты видишь суслика? - Нет - А он есть" (c) ДМБ Плохой хелп - должна быть. вот тебе цитата оттуда: Searches an array for an element containing the same data and data type as an expression. Syntax ASCAN(ArrayName, eExpression [, nStartElement [, nElementsSearched]]) Returns Numeric Arguments ArrayName Specifies the name of the array to search. eExpression Specifies the general expression to search for. nStartElement Specifies the element number at which the search begins. The element number you specify is included in the search. If you omit nStartElement, the entire array is searched by default. nElementsSearched Specifies the number of elements that are searched. If you omit nStartElement and nElementsSearched, the search begins with the first array element and continues to the last array element. Note You can refer to an element in a two-dimensional variable array in one of two ways. The first method uses two subscripts to specify the row and column position of the element in the array; the other method uses an element number. This function and others that manipulate two-dimensional arrays require element numbers (nStartElement and nElementsSearched). Use AELEMENT( ) to return the element number from row and column subscripts in a two-dimensional array. Remarks If a match is found, ASCAN( ) returns the number of the element containing the expression. If a match cannot be found, ASCAN( ) returns 0. The criteria for a successful match of character data are determined by the setting of SET EXACT. If SET EXACT is ON, an element must match the search expression character for character and have the same length. If SET EXACT is OFF, and an element and search expression match until the end of the expression is reached, the match is successful. For more information on match criteria for character strings, see the string comparison table in the SET EXACT topic. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.10.2004, 10:55 |
|
||
|
|

start [/forum/topic.php?fid=41&msg=32758536&tid=1595510]: |
0ms |
get settings: |
11ms |
get forum list: |
17ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
130ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
46ms |
get tp. blocked users: |
1ms |
| others: | 262ms |
| total: | 485ms |

| 0 / 0 |
