2 questions for MYSQL database>frontend Null values and Compass how to's
Hi all,
I have a dreamweaver created frontend that pulls data from a MYSQL database and have come across a couple of sticking points. The database has multiple tables for variables and a central table per user record. I hope I don't need to go into too much detail about the who's, where's, when's and from's as I hope I have most of these bases covered. Basically I am trying to pull data from these MYSQL tables and produce the following;
1) If a value = 0 (Zero or Null) then the text "N/A" should show on the website. The complication with this is that a record is pulled from the main table that pulls the relevant text value from another table (e.g. MAINTABLE_CARMAKEDATA = 1, CARMAKETABLE.ID=1 Therefore CARMAKE = "Ford"). Without entering a new value in the database as a default value e.g. N/A =4 (The main MYSQL field is an integer value that I use to call another table with the relevant value), is there a way within Dreamweaver to ask "IF VALUE = 0 or NONE then display "N/A" (or any other text).
2) I have degrees in the database to show wind direction. How best would I show the direction of wind in a graphical format? I don't have to be too exact (e.g. 0 - 45 degrees would show a picture of an arrow pointing NorthEast, 0 degrees would be North, 180 degrees would be South, etc...), but if a extact method exists all the better (As long as users don't have to download plug ins - Thinking it might be best to have 8 images e.g. N, NE, E, SE, S, SW, W, NW). The database holds an exact value so I might need to say IF DEGREES = 0 - 45 THEN SHOW "N-NE.jpg".
I hope that these questions are simple to answer (and make sense)?
Looking forward to any guidance that can be given.
PaladinDC