Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

  • Website URL
  • Skype

Profile Information

  • Gender
  • Location
    The motherland of Perl
  • Interests
    Programming, books, the American Civil War...
  • Age

Stefany93's Achievements

Regular Member

Regular Member (3/5)




Community Answers

  1. WOW - longest query I have ever seen. Beautiful!
  2. Don't use id as a flight number - make a new key and set it as primary. Always use a primary auto incrementing key in any table. I am sorry, I spelled it wrong, it is many-to-many-relationships table (junction) that is if you went with a different DB design - personally I wouldn't want the codes of the airports being repeated in multiple rows, but would prefer ids and then having them bridged in the junction. However, Barand's answer is better since it uses your existing design. As for the # FRA, ATH # is comment in SQL. I was trying to show you the result of the query, as usually in programming tutorials they will use // to show the results of a statement. I'd also suggest using more descriptive column names - I couldn't figure out what flt_num stood for, for the longest time.
  3. Is this your final script? You want to notify the user via email, no? Because you are not sending an email here, or outputting anything. Check in the phpMyAdmin SQL console your query to make sure it is correct.
  4. I suppose you will need a one-many-relationships (junction) table to prevent duplicate data. But let me show you the simplest way: Let's say you want to fly from JFK to SOF You have a table called schedule below: id, airport, flies_to 1 SOF FRA 2 FRA SOF 3 JFK FRA 4 FRA JFK 5 ATH SOF First you check if JFK flies directly to SOF and if the query returns null, then you run this one: SELECT airport FROM schedule WHERE flies_to = 'SOF' # FRA, ATH
  5. I doubt they will put code that is "bugging beyond belief" in the textbook as you said, since technical books to through a lot of checkups before they are published. Since you said it is 2nd edition, maybe the environment you are testing the questions is too new for them? Either way, if there are really bugs, then enable error display and act accordingly.
  6. ^^ I read somewhere that only if the options are more than 6, then you use a drop-down instead of radio buttons. Since you have 3 options, use radios.
  7. Welcome I am the opposite - I am super bad at design but good with the back end stuff.
  8. ^^ Actually I find the pop-up quite useful if I am writing something and accidentally click the close button on a tab or browser (pls don't hate me, lol) especially if there is no auto safe. As for the op, it is not possible to write to add a custom message onbeforeunload or any event that is triggered when the user wants to leave. You can add some text (on few browsers) additionally to the default message and that's it. Browsers do that for defense.
  9. ^^As the colleague above suggested, use a cron job, but be extra careful when writing the code for it. Make sure you log and email every error because if something goes wrong you won't be able to tell until users start complaining. And make sure to set the server to run the cron during the night (remember that the time in the server might be different than your current timezone)
  10. Thank you so much guys, you have been very helpful. I guess I was looking for "blocking" button but the "ignore" one does the same thing and I completely missed it. Thanks again.
  11. Hello, There is a user here who is harassing me. Every time I make a post, he is the first one to reply and to call me names, etc. I want to block him so I no longer read this bullshit and keep my blood pressure low. Is there such an option? I can't find it. Thank you.
  12. It's possible, if it is an old edition. OP, which year is the book published?
  13. Stefany93


    Kuddos for writing a custom one to understand it. 99% of the programmers would have used a shitty ready made system to understand MVC and would have been more confused at the end. You can think of a controller as a way to have all your pages generated from index.php file while having them in a physical state in the /views folder. It is a confusing concept and everyone have a different opinion about MVC. You dont need MVC to write good code.
  14. Yeah also you have too many duplicates in your DB. What is Generic lighting hanging clamp ? Is it a product name? Then make another table and then connect it with an ID.
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.