| bod1467 on Oct 25, 2006 at 2:30:23 AM (# 7) Like MHenke says, it would certainly make your database smaller (if you have lots of records). However, since you only have 2 semesters and your records are probably already complete in the database, then I would suggest leaving things alone. (Unless you're wanting to do this). emsiva on Oct 25, 2006 at 3:59:42 AM (# 8) This message has been edited.That is a good idea. The mysql database has a teaching_courses table with only 35 records at the moment. There are only 6 fields, so this is a small table. I try to insert data but its not working out...
insert into teaching_courses(semester,titleField,teachyear,documentFile,documentUrl) values ( semester='winter_semester', titleField='twttetw', teachyear=1999, documentFile='', documentUrl='ffggfgfgfgfgdgd' )
All i see is nulls in semester,titleField,teachyear and 1 in documentFile and 0 in documentUrl.
Teaching_courses is set on autoincrement,0 is the default value documentFile(varchar) and 0 in documentUrl(varchar) and the datatype of semester is enum with two values winter_semester and summer_semester. Could you please say what i have done wrong?
MHenke on Oct 25, 2006 at 4:31:47 AM (# 9) This message has been edited.Well, you're actually inserting a bunch of boolean values into your table. 8)
You've already named the columns you want to insert, don't do it again in the VALUES clause, it's plainly wrong syntax. emsiva on Oct 25, 2006 at 6:18:40 AM (# 10)Thanks for pointing that out , now its working :) Jack Turk on Oct 25, 2006 at 6:10:12 PM (# 11) This message has been edited.>For showing the current information :
>select * from teaching_courses where teachyear=2006 And semester='winter_semester'
For showing all the past information (this assumes you have no future info in the DB):
SELECT * FROM teaching_courses WHERE NOT (teachyear=2006 AND semester='winter_semester') Jaky123 on Sep 26, 2007 at 4:13:15 PM (# 12) This message has been edited.You are right.I agree witu you.
select * from teaching_courses where teachyear=2006 And semester='winter_semester'
For showing all the past information (this assumes you have no future info in the DB):
SELECT * FROM teaching_courses WHERE NOT (teachyear=2006 AND semester='winter_semester')
iphone accessories
ipod video converter bod1467 on Sep 27, 2007 at 3:06:49 AM (# 13)I see we have a new link spammer. :-D
|