Клубове Дир.бг
powered by diri.bg
търси в Клубове diri.bg Разширено търсене

Вход
Име
Парола

Клубове
Dir.bg
Взаимопомощ
Горещи теми
Компютри и Интернет
Контакти
Култура и изкуство
Мнения
Наука
Политика, Свят
Спорт
Техника
Градове
Религия и мистика
Фен клубове
Хоби, Развлечения
Общества
Я, архивите са живи
Клубове Дирене Регистрация Кой е тук Въпроси Списък Купувам / Продавам 21:10 05.07.24 
Клубове/ Компютри и Интернет / Бази данни Всички теми Следваща тема Пълен преглед*
Информация за клуба
Тема Re: MySQL [re: Lizard]
Автор curly (Well known :P)
Публикувано05.07.01 17:00  



na primafista malko :>


mysql> select table1.id, table1.id2,table1.id3, concat( table1.data1, table2.data2, table3.data3) as searchString from table1,table2,table3 where concat( table1.data1, table2.data2, table3.data3) like '%33%' and table1.id=3 and table2.id=table1.id2 and table3.id=table1.id3;
+----+-----+-----+--------------------+
| id | id2 | id3 | searchString |
+----+-----+-----+--------------------+
| 3 | 3 | 3 | data13data23data33 |
+----+-----+-----+--------------------+
1 row in set (0.00 sec)

mysql> select table1.id, table1.id2,table1.id3, concat( table1.data1, table2.data2, table3.data3) as searchString from table1,table2,table3 where concat( table1.data1, table2.data2, table3.data3) like '%23%' and table1.id=3 and table2.id=table1.id2 and table3.id=table1.id3;
+----+-----+-----+--------------------+
| id | id2 | id3 | searchString |
+----+-----+-----+--------------------+
| 3 | 3 | 3 | data13data23data33 |
+----+-----+-----+--------------------+
1 row in set (0.01 sec)mysql> select table1.id, table1.id2,table1.id3, concat( table1.data1, table2.data2, table3.data3) as searchString from table1,table2,table3 where concat( table1.data1, table2.data2, table3.data3) like '%23%' and table1.id=2 and table2.id=table1.id2 and table3.id=table1.id3;
Empty set (0.01 sec)



mysql> select table1.id, table1.id2,table1.id3, concat( table1.data1, table2.data2, table3.data3) as searchString from table1,table2,table3 where concat( table1.data1, table2.data2, table3.data3) like '%data12%' and table1.id=2 and table2.id=table1.id2 and table3.id=table1.id3;
+----+-----+-----+--------------------+
| id | id2 | id3 | searchString |
+----+-----+-----+--------------------+
| 2 | 2 | 2 | data12data22data32 |
+----+-----+-----+--------------------+
1 row in set (0.00 sec)



predpolagam 4e salle sha kae po-dobyr na4in za tfa :>
like '%string-looking-for%' e string koito tyrsis
table1.id=id-to-na-table1-za-koeto-tyrsis

rgdz
curly


Цялата тема
ТемаАвторПубликувано
* MySQL Lizard   05.07.01 16:21
. * Re: MySQL curly   05.07.01 17:00
. * Re: MySQL salle   05.07.01 17:46
. * Re: MySQL curly   06.07.01 19:04
. * Re: MySQL salle   05.07.01 17:44
. * Re: MySQL Lizard   09.07.01 13:04
Клуб :  


Clubs.dir.bg е форум за дискусии. Dir.bg не носи отговорност за съдържанието и достоверността на публикуваните в дискусиите материали.

Никаква част от съдържанието на тази страница не може да бъде репродуцирана, записвана или предавана под каквато и да е форма или по какъвто и да е повод без писменото съгласие на Dir.bg
За Забележки, коментари и предложения ползвайте формата за Обратна връзка | Мобилна версия | Потребителско споразумение
© 2006-2024 Dir.bg Всички права запазени.