mi correggo...scusate!
Codice PHP:
<?
// parametri del database
$db_host = "localhost";
$db_user = "root";
$db_password = "";
$db_name = "negozio";
$sql="CREATE DATABASE `negozio`";
mysql_query($sql) or die("errore");
# phpMyAdmin SQL Dump
# version 2.5.3
# [url="http://www.phpmyadmin.net"][url]http://www.phpmyadmin.net[/url][/url]
#
# Host: localhost
# Generato il: 15 Giu, 2004 at 03:08 PM
# Versione MySQL: 4.0.15
# Versione PHP: 4.3.3
#
# Database : `negozio`
#
# --------------------------------------------------------
#
# Struttura della tabella `ditta`
#
$sql="CREATE TABLE `ditta` (
`id` int(11) NOT NULL auto_increment,
`nome` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=4";
mysql_query($sql) or die("errore");
#
# Struttura della tabella `fatture`
#
$sql = "CREATE TABLE `fatture` (
`id` int(11) NOT NULL auto_increment,
`nfatt` text NOT NULL,
`articolo` text NOT NULL,
`desc` longtext NOT NULL,
`um` text NOT NULL,
`quant` double NOT NULL default '0',
`prezzo` double NOT NULL default '0',
`sconto` double NOT NULL default '0',
`importo` double NOT NULL default '0',
`aliquota` int(11) NOT NULL default '0',
`ditta` text NOT NULL,
`pagato` text NOT NULL,
`giorno` text NOT NULL,
`mese` text NOT NULL,
`anno` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=34";
mysql_query($sql) or die("errore");
#
# Struttura della tabella `incassi`
#
$sql="CREATE TABLE `incassi` (
`id` int(11) NOT NULL auto_increment,
`incasso` int(11) NOT NULL default '0',
`giorno` text NOT NULL,
`mese` text NOT NULL,
`anno` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=5";
mysql_query($sql) or die("errore");
?>
ma mi dice
Warning: mysql_query(): Accesso non consentito per l'utente: 'ODBC@localhost' (Password: NO) in c:\programmi\easyphp1-7\www\negozio\setup.php on line 9
Warning: mysql_query(): A link to the server could not be established in c:\programmi\easyphp1-7\www\negozio\setup.php on line 9
errore