<?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[cancellare campi db]]></title><description><![CDATA[<p dir="auto">ciao a tutti. vorrei fare un bottone "empty db" che appunto cancelli tutti i dati contenuti nel db.</p>
<p dir="auto">il db l'ho creato così:</p>
<pre><code>&lt;?php

/**
 * @author Ceorge
 * @copyright 2008
 */
include("configdb.inc.php");
$db = mysql_connect($db_host, $db_user, $db_password);
if ($db == FALSE)
die ("Errore nella connessione. Verificare i parametri nel file config.inc.php");
mysql_select_db($db_name, $db)
or die ("Errore nella selezione del database. Verificare i parametri nel file config.inc.php");
$query = "CREATE TABLE new (id INT (5) UNSIGNED not null AUTO_INCREMENT , numero INT (2) UNSIGNED not null , colore VARCHAR (255) not null , colonna INT (1) not null , gruppo INT (1) not null , pd VARCHAR (255) not null , posizione VARCHAR (255) not null , PRIMARY KEY (id))";
if (mysql_query($query, $db))
echo "L'installazione è stata eseguita correttamente";
else
echo "Errore durante l'installazione";
mysql_close($db);
?&gt;
</code></pre>
<p dir="auto">grazie in anticipo</p>
]]></description><link>https://dev.connect.gt/topic/77620/cancellare-campi-db</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Dec 2026 13:07:43 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/77620.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 15 Jul 2008 19:14:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to cancellare campi db on Tue, 15 Jul 2008 19:29:42 GMT]]></title><description><![CDATA[<pre><code class="language-php">$sql = "TRUNCATE TABLE new";
 
$azione = mysql_query($sql)or die(mysql_error());
</code></pre>
]]></description><link>https://dev.connect.gt/post/740854</link><guid isPermaLink="true">https://dev.connect.gt/post/740854</guid><dc:creator><![CDATA[khendall]]></dc:creator><pubDate>Tue, 15 Jul 2008 19:29:42 GMT</pubDate></item></channel></rss>