<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Query su piu campi di piu tabelle di un database]]></title><description><![CDATA[<p dir="auto">Buongiorno a tutti,<br />
ho una domanda da fare, ho già guardato alcuni siti per esempi in merito, mi è tutto chiaro fino ad un certo punto.<br />
Ho un database con un'unica tabella,_che chiamo TABELLA1 che include per esempio questi campi:<br />
id<br />
nome_giocatore<br />
nome_squadra<br />
anno<br />
presenze</p>
<p dir="auto">Vorrei ora alleggerire il peso di questa tabella, anche per rendere più veloci le query,_creando più tabelle, ovvero:<br />
TABELLA SQUADRA:<br />
id_squadra<br />
nome_squadra<br />
TABELLA GIOCATORE:<br />
id_giocatore<br />
nome_giocatore<br />
Quindi la nuova TABELLA1 sarà:<br />
id_giocatore<br />
id_squadra<br />
anno<br />
presenze<br />
Io creo le id come tipo INT, UNSIGNED, NOT NULL, AUTO_INCREMENT e chiave primaria,_è corretto innanzitutto?<br />
Questa è la query che attualmente uso nel mio sito:</p>
<pre><code class="language-php">$lettura_risultati=mysql_query("select id, nome_utente, tipo_struttura, nome_struttura, naz_struttura, luogo_struttura, mese_sogg, anno_sogg, titolo_rec, voto_struttura, voto_qualita_cam, voto_ristorante, voto_pulizia, voto_eff_servizi, testo_rec, date_format(data_ora_ins, '%d/%m/%Y - ore %H:%i:%s') as data_formattata, MATCH(nome_struttura, tipo_struttura, naz_struttura, luogo_struttura) AGAINST('". $_POST['nome_ric'] ." ". $_POST['tipo_ric'] ." ". $_POST['naz_ric'] ." ". $_POST['luogo_ric'] ."' IN BOOLEAN MODE) AS tot from recensioni where MATCH(nome_struttura, tipo_struttura, naz_struttura, luogo_struttura) AGAINST('". $_POST['nome_ric'] ." ". $_POST['tipo_ric'] ." ". $_POST['naz_ric'] ." ". $_POST['luogo_ric'] ."' IN BOOLEAN MODE) order by tot DESC");
</code></pre>
<p dir="auto">Come faccio a fare una query dove a video mi farà vedere il campo descrittivo nome_squadra_(per esempio) e nome_giocatore?_Come faccio a legare i campi di più tabelle nella query?<br />
Grazie mille e buona giornata.</p>
]]></description><link>https://dev.connect.gt/topic/93423/query-su-piu-campi-di-piu-tabelle-di-un-database</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 20:15:30 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/93423.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Jan 2009 08:32:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Query su piu campi di piu tabelle di un database on Wed, 28 Jan 2009 18:27:02 GMT]]></title><description><![CDATA[<p dir="auto">Ciao, posso usare le join ma trovo difficoltà a inserirla all'interno della query che ho già strutturato...</p>
]]></description><link>https://dev.connect.gt/post/804039</link><guid isPermaLink="true">https://dev.connect.gt/post/804039</guid><dc:creator><![CDATA[luseresi]]></dc:creator><pubDate>Wed, 28 Jan 2009 18:27:02 GMT</pubDate></item><item><title><![CDATA[Reply to Query su piu campi di piu tabelle di un database on Wed, 28 Jan 2009 10:17:41 GMT]]></title><description><![CDATA[<p dir="auto">Devi usare le JOIN.<br />
Qui hai la guida <a href="http://database.html.it/guide/lezione/2450/luso-delle-join/" rel="nofollow ugc">database.html.it/guide/lezione/2450/luso-delle-join/</a></p>
]]></description><link>https://dev.connect.gt/post/804038</link><guid isPermaLink="true">https://dev.connect.gt/post/804038</guid><dc:creator><![CDATA[memic4]]></dc:creator><pubDate>Wed, 28 Jan 2009 10:17:41 GMT</pubDate></item></channel></rss>