Main menu

Skip to primary content
Skip to secondary content
  • Home
  • Downloads
  • Artworks

Archives

Recent Posts

  • Get something in the mail
  • Not dead: Number Five is Alive
  • Ipso facto I passed
  • Argh philosophy
  • Up-grade
  • Beyond thought: liked, but…
  • Programming something…
  • Route 66: Oklahoma to Texas
  • I can has new internets!
  • Coolest of Windows 7

Categories

  • Farmland chronicles
  • h00min resources
  • ITainment
  • Japanese Music
  • Japanese TV
  • Johnny's Jimusho
  • Korean music (kpop)
  • Korean TV
  • Music
  • Psychology
  • Solstice Productions
  • Tomohisa Yamashita
  • Webdesign

Recent Comments

  • Feles on Route 66: Kansas & Oklahoma
  • Manu chan on Route 66: Kansas & Oklahoma
  • Manu chan on It made my day (even further)
  • SnowMyth on Life passes you by
  • Tsubasa on Downloads

Tag Archives: sql

LEFT JOIN, RIGHT JOIN

May
10
2009

I’ve noticed a very interesting difference between my local development environment and my actual webhosting. In the master post this is the query that displays the artists available (if they have downloads). On my local development environment all the artists keep coming up, while on my webhosting only those with downloads show up (as they should). If I change LEFT JOIN to RIGHT JOIN I reverse the problem. lol.

  1. SELECT ar_artist_id, ar_artist, ar_image, COUNT(vi_artist_id) AS ar_numvideo
  2. FROM (artist INNER JOIN videos ON artist.ar_artist_id = videos.vi_artist_id) LEFT JOIN videodownloads ON videos.vi_video_id = videodownloads.vd_video_id
  3. WHERE artist.ar_pubterm <> ‘Actor’ OR ‘Actress’
  4.                  GROUP BY ar_artist_id
  5.                  ORDER BY ar_artist

It’s the same with this query that shows the downloads per artist on the artist page.

  1. SELECT artist.ar_artist_id, videotypes.vt_videotype, videotypes.vt_videotype_id
  2. FROM artist INNER JOIN (videotypes INNER JOIN videos ON videotypes.vt_videotype_id = videos.vi_videotype_id) ON artist.ar_artist_id = videos.vi_artist_id LEFT JOIN videodownloads ON videos.vi_video_id = videodownloads.vd_video_id
  3. GROUP BY artist.ar_artist_id, videotypes.vt_videotype, videotypes.vt_videotype_id
  4. HAVING (((artist.ar_artist_id)=$artistId))

What the hell? I have no explanation. haha.

Posted in Webdesign | Tagged master post, programming, sql | Leave a reply

Master post runs on my catalog

Apr
24
2009

If you click my DL Master Post right now, you will see something awesomely cool. I mentioned I was busy trying to create an ‘online’ version of my video catalog (which stems from my anal habit of keeping things organized). I have an application offline to make sure I never loose things and that I always know where they are. What I’ve done, is make use of the information already in that database and selectively pull out stuff I’ve uploaded for you (the batshit crazy fandom). I’m not a top programmer, but I can manage that’s for sure. The proces behind this is actually quite interesting, so here’s a quick-n-dirty drawing what it is that I did:

catalog

It’s made in such a way that if I ever were to decide I want to show you my full catalog, it’s pretty much easily possible. For now I will keep it as is. I’ve deleted a couple of functions that I think may be added to the master post. For instance:

  • When you select an artist now, in my original catalog you can narrow the amount of videos displayed by videotype (pv, tv show, etc). In the online version that’s been stripped off.
  • I’ve deleted the breadcrumb function because I was too lazy to do that.

Since it is running by integrating it into a WordPress page template, whichever new template I make in the future, the catalog will adhere to. Right now it has a small glitch because this template outlines text “justified”, but I’ll fix that.

In any case, enjoy the new function. There aren’t any new downloads yet, but there will be soon. If I ever manage to, I’ll open up the source code so you can be just as anal as I am. XD. Not sure you want to.

:smile:

Posted in Johnny's Jimusho, Webdesign | Tagged master post, php, programming, sql, theme development | Leave a reply

RSS Recent tracks

  • 雅-MIYAVI- – ¥Ý¥Ã¥×¥ó¥í©`¥ë¼××Óˆ@£¨¥Ù©`¥¹¥Ü
  • Subway To Sally – Judaskuss
  • KAT-TUN – WHITE WORLD
  • Scar Symmetry – Deviate From The Form
  • Children of Bodom – In Your Face
  

© 2011/ 2012 - Code Silence