Domande taggate «mysql»

MySQL è un sistema di gestione di database relazionali (RDBMS) gratuito e open source che utilizza Structured Query Language (SQL). NON USARE questo tag per altri DB come SQL Server, SQLite ecc. Questi sono DB diversi che usano tutti i propri dialetti di SQL per gestire i dati.

6
MySQL DISTINCT su un GROUP_CONCAT ()
Lo sto facendo SELECT GROUP_CONCAT(categories SEPARATOR ' ') FROM table. Dati di esempio di seguito: categories ---------- test1 test2 test3 test4 test1 test3 test1 test3 Tuttavia, sto test1 test2 test3 test4 test1 test3tornando e vorrei test1 test2 test3 test4tornare. Qualche idea? Grazie molto!



9
MySQL Great Circle Distance (formula Haversine)
Ho uno script PHP funzionante che ottiene i valori di longitudine e latitudine e quindi li inserisce in una query MySQL. Mi piacerebbe farlo solo MySQL. Ecco il mio attuale codice PHP: if ($distance != "Any" && $customer_zip != "") { //get the great circle distance //get the origin zip …
184 php  mysql  great-circle 


6
come personalizzare `show processlist` in mysql?
Voglio ordinare per Time, ma sembra che non ci sia modo di farlo? mysql> show processlist; +--------+-------------+--------------------+------+---------+--------+----------------------------------+------------------------------------------------------------------------------------------------------+ | Id | User | Host | db | Command | Time | State | Info | +--------+-------------+--------------------+------+---------+--------+----------------------------------+------------------------------------------------------------------------------------------------------+ | 1 | system user | | NULL | Connect | 226953 | Waiting for …

3
INSERISCI… SUL TASTO DUPLICATO (non fare nulla)
Ho una tabella con una chiave univoca per due colonne: CREATE TABLE `xpo`.`user_permanent_gift` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `fb_user_id` INT UNSIGNED NOT NULL , `gift_id` INT UNSIGNED NOT NULL , `purchase_timestamp` TIMESTAMP NULL DEFAULT now() , PRIMARY KEY (`id`) , UNIQUE INDEX `user_gift_UNIQUE` (`fb_user_id` ASC, `gift_id` ASC) …
184 mysql  sql  unique-key 








2
MySQL: ordina i valori GROUP_CONCAT
In breve: c'è un modo per ordinare i valori in un'istruzione GROUP_CONCAT? Query: GROUP_CONCAT((SELECT GROUP_CONCAT(parent.name SEPARATOR " » ") FROM test_competence AS node, test_competence AS parent WHERE node.lft BETWEEN parent.lft AND parent.rgt AND node.id = l.competence AND parent.id != 1 ORDER BY parent.lft) SEPARATOR "<br />\n") AS competences Ottengo questa …

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.