Jump to content

Chud37

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Everything posted by Chud37

  1. bump. BUMP BUMP BUMP.
  2. Hello, I have a form generated by mySQL and PHP, and inside the form (named 'UpdateDB') each line has checkboxes, like so: <input type="checkbox" name="checkbox[]" value="96" onclick="highlight(this,'check_96')"> The onclick is to highlight the row, that works fine. However, I wrote a javascript function that toggles the select all the checkboxes or none. This is done by an image: <img src="img/select.png" align="top"> <a href="#" onClick="togBox('updateDB');"><img src="img/all.png" name="listToggle" align="top"></a> Easy, right? So heres the Javascript function that the above image (the 'none' part) links to: function togBox(form) { var myForm = document.forms[form]; document.listToggle.src=='http://gospeltruth.tv/admin/img/all.png' ? toggle = true : toggle = false; (toggle) ? document.listToggle.src='img/none.png' : document.listToggle.src='img/all.png'; for( var i=0; i < myForm.length; i++ ) { (toggle) ? myForm.elements[i].checked = 'checked' : myForm.elements[i].checked = ''; } } Its a brilliant function if I do say so myself, and this is what I dont get: yesterday, it was working fine, today, its not working at all. The image changes, but IE flags up the 'myForm.length' as an error. How was it working 2 days ago and not today, when I havent touched it? Can anybody advise why its not currently working? Thanks for your help, ~Chud37
  3. This Is my SQL to retrieve info: SELECT pID, airdate, title, summary, duration, url, public, modTitle, Language FROM `Programs` JOIN Modules ON Programs.mID = Modules.ID JOIN Languages ON Programs.vID = Languages.ID ORDER BY title ASC; and the Modules and Languages tables simply have ID and then [modTitle] and [Language] fields. For some reason the above SQL statement was working, but isnt anymore. I dont know why this is. I hope t his explains it a bit better.
  4. No, okay, I dont want to Update, I was confusing English with SQL commands. I want to Insert new rows onto three tables at once, sort of.
  5. hello; I need to update a main table called 'programs' which is linked via two JOINS to a `Module` table and a `Language` table. Both the Language and the Module table have two columns, 'ID' and either 'Module' or 'Language'. I would like to be able to update all of these with a single SQL statement, however I am not able to get the INSERT to function on more than one table. So I am having to then update each table one by one. Which is problem no.1. if that isnt possible, then problem no.2. is looping through the data, and putting the information not only in the programs table, but into the Modules and Languages table to, and then keeping the two linking fields in `Programs` the same as the corresponding fields in both `Modules` and `Language`. i hope I have made myself clear. Does anyone have any solution to how I can code this, as i could really do with some help. Thanks, Chud37
×
×
  • 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.