User talk:Animeniacs

sample 101 mangafox 12 6 otakuworks $sample1a = $_POST['month1']; /*echo $sample1a;*/ $sample1b = $_POST['day1']; $sample1c = $_POST['yeara']; $sample2a = $_POST['month2']; $sample2b = $_POST['day2']; $sample2c = $_POST['yearb'];

if ($sample1c>$sample2c) {											echo "INVALID INPUT CLICK OKEY BELOW TO REGISTER AGAIN"; echo " "; echo ' OKEY'; }											else if ($sample1c==$sample2c and $sample1a>$sample2a) {											echo "INVALID INPUT CLICK OKEY BELOW TO REGISTER AGAIN"; echo " "; echo ' OKEY'; }											else if ($sample1c==$sample2c and $sample1a==$sample2a and $sample1b>$sample2b) {											echo "INVALID INPUT CLICK OKEY BELOW TO REGISTER AGAIN"; echo " "; echo ' OKEY'; }										else {																1.       Return those courses that have been taught at least in two semesters. Ans. SELECT Course.crscode, crsname,credits FROM Course, Taught WHERE Course.crscode=Taught.crscode GROUP BY Course.crscode HAVING COUNT(semester)>=2 ; 2.       Return those courses that have been taught by at least 5 different professors. Ans. SELECT Course.crscode, crsname,credits FROM Course, Taught, Professor WHERE Course.crscode=Taught.crscode AND Professor.ssn=Taught.ssn GROUP BY  Course.crscode HAVING COUNT(Taught.ssn)>=5; 3.       Return the names of full professors who ever taught at least two courses in one semester. Ans. SELECT Profname FROM Course, Taught, Professor WHERE Course.crscode=Taught.crscode AND Professor.ssn=Taught.ssn AND status='FULL'  GROUP BY Profname HAVING COUNT(Taught.crscode)>=2; Table Name: D1							Tabale Name: X1				Table name: C1 dish_id	dish_name	country	price				ingredient_id	ingredient_name	store_id		Dish_id	ingredient_id teri01	Chicken Teriyaki	Japan	7.99				1423	Chicken	fres01		teri01	1423 teri02	Beef teriyaki	Japan	7.99				1211	Bacon	mark01		teri01	2222 burg01	Bacon Burger	USA	5.25				909	Onion	fres01		teri02	337 faji01	Chicken Fajitas	Mexico	7.99				5628	Lettuce	eat01		teri02	2222 teri03	Tofu Teriyaki	Japan	6.99				8191	Tomato	mark01		burg01	337 burg02	Veggie Burger	USA	4.99				2212	Feta cheese	fres02		burg01	1211 chow01	Canton Chow	Mein China		6.99			2222	Green pepper	eat01		faji01	1423 souvl01	Pork Souvlaki	Greece	5.99				337	Chili pepper	pepper		faji01	909 sala01	Greek Salad	Greece	3.99				771	Spaghetti Alfredo	food01 spag01	SpaghettiAlfredo	Italy	5.99 Table Name: S1 store_id	store_name	address mark01	The Good Market	857 Dundas St W. eat02	Eat well, Downtown	4 King St. E. fres01	Fresh Food!,Downtown	15 College St. W. food01	Food delight	72 Beaconsfield Ave. fres02	Fresh Food!, North York	5982 Yonge St. eat01	Eat Well, Scarborough	Scarborough Centre 4. List store_name, ingredient_name, dish_name (use natural join and inner join) Ans. SELECT store_name, ingredient_name, dish_name FROM S1 INNER JOIN ON ( X1 INNER JOIN ON D1); 5. List the most used ingredient_name Ans. SELECT ingredient_name FROM X1, C1, D1 WHERE X1.ingredient_id=C1.ingredient_id AND C1.ingredient_id=D1.ingredient_id HAVING MAX(COUNT(ingredient_name)) ; Table Name: CD CDID ARTID CDTITLE              CDPRICE          CDGENRE - - --- 														  1     1       Mix                          9.99                 Rock 2    1       Magic Lines                 11.49             Rock 3    2       Broadcast                    9.99              Electronica 4    2       Vicarious                    9.99               Electronica 5    3       Supersystem                  9.99            Rock 6    3       Communicate                 11.49           Rock 7    4       The 88                      12.49              Electronica 8    5       Live at the Matterhorn       9.99          Reggae/Dub 9    7       Uprising                    11.49               Electronica 10    6       Killervision                11.49               Reggae/Dub 6. Find the lowest price of any CD Ans. SELECT MIN(CDPRICE) AS LowestPrice FROM CD; 7. Find the number of CDs costing 11.49 Ans. SELECT COUNT(CDID) FROM CD WHERE CDPRICE=11.49 GROUP BY CDID; 8. Find the most expensive Rock CD Ans. SELECT CDID, CDTITLE FROM CD WHERE CDGENRE='Rock' HAVING MAX(CDPRICE); 9. Find the number of different genres in the CD table Ans. SELECT COUNT(CDGENRE), CDGENRE FROM CD GROUP BY CDGENRE; 10. Find a list of the cheapest CDs Ans. SELECT * FROM CD  GROUP BY CDID HAVING MIN(CDPRICE); 11. Write an SQL statement to create a table for table CD Ans. CREATE TABLE CD({CDID NUMBER(11, 0) NOT NULL, ART ID NUMBER(11; 0), CDTITLE VARCHAR2(30), CDPRICE FLOAT(2), CDGENRE VARCHAR2(30)}); 12. Write an SQL statement to remove column CDGENRE Ans. ALTER TABLE CD DROP COLUMN CDGENRE; 13. Find the number of CDs each ARTID has release Ans. SELECT COUNT(ARTID) FROM CD GROUP BY ARTID; 14. Create table Sample with the following fields: CDTITLE (text), CDGENRE(Text) Ans. CREATE TABLE Sample({CDTITLE VARCHAR2(30) NOT NULL, CDGENRE VARCHAR2(30)}); 15. Add in table Sample the result of the query which displays the cdtitle and cdgenre of table CD whose cdprice is above 12.00 pesos Ans. SELECT CDTITLE, CDGENRE FROM Sample INNER JOIN CD ON CDPRICE>12.00;

webapp
Arrival Date:     

January February March April May June July August September <option value ="October ">October <option value ="November">November <option value ="December">December <select name="day1" size="1"> 1 													 2   													 3    													 4   													 5   													 6  													 7   													 8 													 9 													 10 													 11 													 12    													 13    													 14   													 15   													 16  													 17   													 18 													 19 													 20 													 21 													 22    													 23    													 24   													 25   													 26  													 27   													 28 													 29 													 30 															Year: <select name = "year1" size ="1"> <option value ="????">???? 2010 													 2011 													 2012    													 2013  													 2014

echo "Arrival Date:"."&nbsp&nbsp&nbsp&nbsp    ".$_POST['month1']." ".$_POST['day1']." ".$_POST['year1']." ";