Re: relational tables
Sorry, I'm a top quoter. This is what I want to do. I'm still told there re problems with my keys. DROP TABLE IF EXISTS `person`; CREATE TABLE `person` ( `person_id` int(11) NOT NULL auto_increment, `name` varchar(255) default NULL, `email` varchar(255) default NULL, PRIMARY KEY (`person_id`), KEY `email` (`email`), KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; INSERT INTO `person`( `person_id`, `name`, `email` ) VALUES ( 1, 'Name', '[EMAIL PROTECTED]' ) ; INSERT INTO `person`( `person_id`, `name`, `email` ) VALUES ( 2, 'second Name', '[EMAIL PROTECTED]' ) ; DROP TABLE IF EXISTS `shopping`; CREATE TABLE IF NOT EXISTS `shopping` ( `shopping_id` int(11) NOT NULL, `email` varchar(255) default NULL, `name` varchar(255) default NULL, PRIMARY KEY (`shopping_id`), UNIQUE KEY `email` (`email`), UNIQUE KEY `name` (`name`), FOREIGN KEY (`email`) REFERENCES `person` (`email`), FOREIGN KEY (`name`) REFERENCES `person` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Sebastian Mendel wrote: This is InnoDB so I should be able to do this by SQL, right? where do you want to see this drop-downs? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
relational tables
I want to make a relational link from `data` to `shopping` so when I insert a new record in `shopping`, I will see the contents of `data`.`name` and `data`.`email` as drop-down menus in `shopping`. This is InnoDB so I should be able to do this by SQL, right? Thanks, John DROP TABLE IF EXISTS `data`; CREATE TABLE `data` ( `id` int(5) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; INSERT INTO `data` VALUES(1, 'Allen, Carolyn', '[EMAIL PROTECTED]'); INSERT INTO `data` VALUES(2, 'Atwood, Margaret', '[EMAIL PROTECTED]'); DROP TABLE IF EXISTS `shopping`; CREATE TABLE `shopping` ( `id` int(5) NOT NULL auto_increment, `name` varchar(100) NOT NULL, `address` varchar(100) NOT NULL, `email` varchar(100) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: phpmyadmin problems with quoting exported text
Which version? Which export type? Strings TEXT, VARCHAR would be quoted. INT would not, I think. Their forum might be a better place. www.phpmyadmin.net. 2wsxdr5 wrote: I just tried to use the output of the export function on phpmyadmin and got a million errors. After looking at the file I found that certain columns that are strings were not quoted at all. I can't find any reason why some are and some are not quoted. Anyone have any idea why this is happening? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
match by relevancy
I'm using PHP Version 4.3.9 and MySQL 4.1.12. I recently upgraded from PHP 4.1.x and MySQL 4.0.x. Basically my SQL worked until my upgrade. ORDER BY relevancy DESC no longer works? SELECT *,MATCH (AU,ST,SD) AGAINST ('johnston' IN BOOLEAN MODE) AS relevancy FROM ccl.ccl_main WHERE MATCH (AU,ST,SD) AGAINST ('johnston' IN BOOLEAN MODE) ORDER BY relevancy DESC; I see no inpsiration in the relevant part of the Docs: http://dev.mysql.com/doc/refman/4.1/en/fulltext-search.html nor http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html Desperately looking for an answer. Any thoughts? John -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]