Costruire tabella
-
Ciao a tutti sto cercando di costriure 2 tabelle, che dovrei importare nel database.. la prima è questa:
ron_bgprofile
la sua query:$sql = "SELECT id, avlink FROM ron_bgprofile ORDER BY id DESC LIMIT $limit_start, $items_per_pagee la tabella che sto facendo:
-- -- Table structure for table `ron_bgprofile` -- CREATE TABLE `ron_bgprofile` ( `id` int(10) NOT NULL auto_increment, `avlink` varchar(30) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1; -- -- Dumping data for table `ron_bgprofile` --e l'altra tabella è questa:
ron_kar
la sua query:$avlnk = mysql_fetch_array(mysql_query("SELECT itemurl,title FROM ron_kar WHERE id='".$avid."'"));e la tabella che sto facendo:
-- -- Table structure for table `ron_kar` -- CREATE TABLE `ron_kar` ( `itemurl` int(10) NOT NULL auto_increment, `title` varchar(30) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `itemurl` (`itemurl`) ) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1; -- -- Dumping data for table `ron_kar` --ma le ambedue tabelle non vanno.. dove sbaglio?
-
Ciao ho provato a fare la prima tabella e non ha errori, la seconda hai sbagliato "PRIMARY KEY (
id)" al posto di "id" devi mettere "itemurl" -
a ecco.. grazie giova:)
-
Prego di niente

Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi