IRC log for #udbug on 20090216

16:12.50*** join/#udbug fungus (n=olsonl@bromine.sosstaffing.com)
16:12.50*** mode/#udbug [+o fungus] by ChanServ
16:17.52*** join/#udbug thebigdog (n=thebigdo@70.103.91.98)
21:29.44*** join/#udbug brasto (n=brasto@66-182-82-217.static.slcl007.digis.net)
21:29.44*** mode/#udbug [+o brasto] by ChanServ
21:42.56*** join/#udbug murdock_ut (n=chatzill@mail.kimballequipment.com)
21:43.07murdock_utHowdy all.
21:43.56murdock_utI'm working with some student attendance data. I've been asked to find out which students have 10 consecutive absences. Can someone give me some hints on how I would do this?
21:51.29thebigdogwhich database are you using?
21:51.48fungusI think you will need to pull the data out, and process it in code.
21:52.32murdock_utsorry.
21:52.35murdock_utUm mysql.
21:53.49murdock_utI was hoping to do it all in SQL so I can use my report writer.
21:54.00murdock_utmysql that is.
21:54.25thebigdogwhich version of mysql?
21:54.32thebigdogyou could do it in a stored proc
21:54.47thebigdogbut that is pretty indept coding...unless you are familiar with it
21:56.28murdock_ut5.0
21:56.48murdock_utI've just done some some simple functions.
22:00.55thebigdogi can point you to some queries for it...but they are complex
22:01.10murdock_utThat will be a good start.
22:01.11thebigdogthat is why fungus mentioned doing it outside sql
22:01.17murdock_utSure.
22:01.25thebigdoghttp://www.artfulsoftware.com/infotree/queries.php?&bw=1234#577
22:01.43thebigdogthat is a query to find available reservations...which is very similar to what you are doing
22:02.20thebigdogand this one too http://www.artfulsoftware.com/infotree/queries.php?&bw=1234#71
22:02.28thebigdogit would be a combo of those t2o
22:02.58thebigdogif i where doing it though i would be using a stored procedure to do it
22:03.39thebigdogbut it is also dependent on how your db tables are setup too
22:04.13fungusstored procs are harder than your favorite language most of the time.  But your need sounds different.
22:05.30thebigdogand datediff will be your friend...your very best friend
22:06.55murdock_utI'm sure I could figure out how to do it in PHP but I I want to use my report designer then I needs to be done in sql.  I feel a headache coming one.  :)
22:07.32thebigdogit will be hard in sql
22:07.40thebigdogvery hard
22:07.56thebigdogthat is one plus of postgresql
22:08.03thebigdogthey have an overlap feature that is nice
22:17.38murdock_utWouldn't I want a function, not a stored proc?
22:26.16thebigdoga function is limited
22:28.49murdock_utCan you return a value with a stored proc?
22:41.45thebigdogyes
22:41.58thebigdogyou can return anything really
22:42.11thebigdogbut it allows you to do logic and cursos
22:42.14thebigdogcursors
22:42.25thebigdogallows you to do other queries inside
23:27.01murdock_utfunctions do not huh.
23:49.36thebigdogno functions are not
23:50.39thebigdogand they are typically used for triggers
23:52.54thebigdogif you are really good at c you could probably write a function in c and it would be extremely fast

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.