Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Anonymous
Saturday, August 4th, 2007 at 5:19:32am MDT 

  1. select t.row1, p1.name as key1, p2.name as key2
  2. from table1 t
  3. left join table2 p1 on (t.key1=p1.id)
  4. left join table2 p2 on (t.key2=p2.id)
  5.  
  6.  
  7.  
  8. -- phpMyAdmin SQL Dump
  9. -- version 2.6.1
  10. -- http://www.phpmyadmin.net
  11. --
  12. -- Host: localhost
  13. -- Generation Time: Aug 04, 2007 at 12:19 PM
  14. -- Server version: 4.1.9
  15. -- PHP Version: 4.3.10
  16. --
  17. -- Database: `cert`
  18. --
  19.  
  20. -- --------------------------------------------------------
  21.  
  22. --
  23. -- Table structure for table `table1`
  24. --
  25.  
  26. CREATE TABLE `table1` (
  27.   `row1` int(5) NOT NULL auto_increment,
  28.   `key1` int(5) NOT NULL default '0',
  29.   `key2` int(5) NOT NULL default '0',
  30.   PRIMARY KEY  (`row1`)
  31. ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
  32.  
  33. --
  34. -- Dumping data for table `table1`
  35. --
  36.  
  37. INSERT INTO `table1` VALUES (1, 1, 2);
  38. INSERT INTO `table1` VALUES (2, 3, 4);
  39.        

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right
worth-right
worth-right
fantasy-obligation