Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [SQL]Problem z zapytaniem MySQL
trifek
post
Post #1





Grupa: Zarejestrowani
Postów: 340
Pomógł: 0
Dołączył: 28.09.2015

Ostrzeżenie: (0%)
-----


Witam serdecznie,
Mam zapytanie:
  1. SELECT id FROM baza WHERE ( ((SQRT ( (szer - 51.8566932) ^ 2 + (dl - 4.3604945) ^ 2)) * 111.2 < 5 ) ) ORDER BY id ASC


Które zwraca mi błąd:
#1690 - BIGINT UNSIGNED value is out of range in '(((`radio`.`baza `.`szer` - 51.8566932) ^ 2) + ((`radio`.`baza `.`dl` - 4.3604945) ^ 2))'


Wie ktoś może jak to naprawić?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
trifek
post
Post #2





Grupa: Zarejestrowani
Postów: 340
Pomógł: 0
Dołączył: 28.09.2015

Ostrzeżenie: (0%)
-----


Mam taką tabelę:
  1.  
  2. CREATE TABLE `baza` (
  3. `id` bigint(20) UNSIGNED NOT NULL,
  4. `szer` float(10,6) NOT NULL DEFAULT '0.000000',
  5. `dl` float(10,6) NOT NULL DEFAULT '0.000000'
  6. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  7.  
  8.  
  9. ALTER TABLE `baza`
  10. ADD PRIMARY KEY (`id `);
  11.  
  12.  
  13. ALTER TABLE `baza`
  14. MODIFY `id ` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;COMMIT;
  15.  


Szerokość i długość mam w formacie: 51.855747 4.361342


Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 12.10.2025 - 01:32