balkan7 Posted November 13, 2006 Share Posted November 13, 2006 i need help for this, look to the picture, Category and CD show to number, i need show me to charters, and checkbox, if checked show me 1 if not chacked show me 0, i need this, if checked show me NEW, if not checked nothing show!soryy for bad english !!![img]http://www.prerodbalab.org/test/add.JPG[/img][img]http://www.prerodbalab.org/test/view.JPG[/img]datebase.sql:[code]CREATE TABLE `product` ( `id` INT(250) NOT NULL AUTO_INCREMENT, `sifra` VARCHAR(25) NOT NULL, `naslov` VARCHAR(250) NOT NULL, `opis` TEXT NOT NULL, `kat_id` VARCHAR(25) NOT NULL, `cd_id` VARCHAR(25) NOT NULL, `novo` TINYINT(1) NOT NULL, `datum` VARCHAR(250) NOT NULL, `validen` TINYINT(1) NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM;CREATE TABLE `product_kategorija` ( `id` INT(25) NOT NULL AUTO_INCREMENT, `kategorija` VARCHAR(250) NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM;CREATE TABLE `product_cd` ( `id` INT(25) NOT NULL AUTO_INCREMENT, `cd` VARCHAR(250) NOT NULL, PRIMARY KEY (`id`)) ENGINE=MyISAM;[/code] Link to comment https://forums.phpfreaks.com/topic/27124-php-and-mysql-help/ Share on other sites More sharing options...
SharkBait Posted November 13, 2006 Share Posted November 13, 2006 When you print out your database entries you would set something up like this:[code]<?phpecho "<td> CD"; switch($database['cd']) { case 6: echo "DVD 1"; break; case 7: echo "DVD 2"; break; }echo "</td>";?>[/code]Anyway thats a really basic way... Link to comment https://forums.phpfreaks.com/topic/27124-php-and-mysql-help/#findComment-124006 Share on other sites More sharing options...
balkan7 Posted November 13, 2006 Author Share Posted November 13, 2006 i have code for that, but i need code now from mysql, CD and Category have same Table Id, here call from Id, but i need call whit Name not Id. Link to comment https://forums.phpfreaks.com/topic/27124-php-and-mysql-help/#findComment-124104 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.