Jump to content

benign

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by benign

  1. Hi everybody:I wanted to set my phpmydirectory (the yellow page script) on my windows system and tried it with installing wamp5 but it doesn't work.Anybody knows why and have any solution?ThanksBenign
  2. Hi:Is it possible that I have a html check box that if I check it it unhide the rest of the form? For example if the user has telephone he checks the check box and then the text field for the telephone appears.ThanksBenign
  3. Hi:How can I make a Dynamic Dependent Drop Down lists? the easiest example is country/city drop down lists.If the user chooses a country then in the next drop down all the cities(or states) or the chosen country appear. Is it possible to make it in php/mysql?Please let me know how I can make such a thing.Thanks.Benign
  4. benign

    Table problem

    Hi:As a matter of fact I have One-To-Many relationship. A publisher can have several books but a book has one publisher. All I need is a way I can add more than one book to a publisher at the same time. I mean several text fields in my form that all send the Book names into the Book table.Unfortuantly I do not know java script well and that is a bad thing I know... But is there any easier code for what I said.You know for examplePublisher A has published 3 books: Book1,Book2,Book3and I want a form that gives me way that while I add the publisher name at the same time I can add 3 books and they three go to the Book table with the FK of PublisherID for Publisher A.thanksBenign
  5. benign

    Table problem

    Hi:I want to make a list of publishers. Each publisher has 5-10 or more books. I have a table for publisher and a table for books.I pasted all the script and the console view down but problem is:I made a form for the publisher registery and I have a filed that I can insert the publisher. But I need to enter many publishers name at the same time. I need a way to have several publisher text fields in my form that I can enter them at the same time for one book. If I can increase the fields (the way you can do it when you want to attach files into yahoo mail and you want to add more than 5 and down there there is a link "Attach More Files") by clicking on a link it will be ideal for me. Please please let me know how I can do such a thing.ThanksBenignMysql DB console view:mysql> use publishers;Database changedmysql> show tables;+----------------------+| Tables_in_publishers |+----------------------+| books || publisher |+----------------------+2 rows in setmysql> show columns from books;+-------------+-------------+------+-----+---------+----------------+| Field | Type | Null | Key | Default | Extra |+-------------+-------------+------+-----+---------+----------------+| BookID | tinyint(4) | NO | PRI | NULL | auto_increment || BookName | varchar(50) | YES | | NULL | || PublisherID | tinyint(4) | NO | MUL | | |+-------------+-------------+------+-----+---------+----------------+3 rows in setmysql> show columns from books;+-------------+-------------+------+-----+---------+----------------+| Field | Type | Null | Key | Default | Extra |+-------------+-------------+------+-----+---------+----------------+| BookID | tinyint(4) | NO | PRI | NULL | auto_increment || BookName | varchar(50) | YES | | NULL | || PublisherID | tinyint(4) | NO | MUL | | |+-------------+-------------+------+-----+---------+----------------+3 rows in setMysql DB scrip of my tables:CREATE DATABASE `publishers`CHARACTER SET 'latin1'COLLATE 'latin1_swedish_ci';## Structure for the `books` table : #CREATE TABLE `books` ( `BookID` tinyint(4) NOT NULL auto_increment, `BookName` varchar(50) default NULL, `PublisherID` tinyint(4) NOT NULL, PRIMARY KEY (`BookID`), KEY `PublisherID` (`PublisherID`), CONSTRAINT `PublisherID` FOREIGN KEY (`PublisherID`) REFERENCES `books` (`PublisherID`) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=latin1;## Structure for the `publisher` table : #CREATE TABLE `publisher` ( `PublisherID` tinyint(4) NOT NULL, `PublisherName` varchar(50) default NULL, PRIMARY KEY (`PublisherID`)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
×
×
  • Create New...