Jump to content

peter.t

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Everything posted by peter.t

  1. Confusing, I know. I have two columns in my mysql table; Title and Season. An example entry looks like this: Title: People visit place x Season: Winter 2009 What I would like to do, on my list page is list the Season and then list all the entries in that season. So the list would look like this: Winter 2009 People visit place x Speech y was given here Group s toured facility j As opposed to this: Winter 2009 People visit place x Winter 2009 Speech y was given here Winter 2009 Group s toured facility j Any chance I’m just having a mental mind-block and this is easy to do? Thanks!
  2. I gotcha. Makes sense and does seem less painful in the long run. I think I was just trying to combine too many processes into one. I liked the use of the comma-separated checkbox and wanted to run with it. Thanks for the help Keith!
  3. Thanks! There is a separate table that the values do correspond to. And that's definitely way I'd like to go. This is the column I'm pulling the values from $row_rsKSA['knowledge_ksa'] Here's the equivalent of what I've got: Table 1 = id, color Table 2 = id, color_id The color_id has the multiple values (1,5,7)
  4. OK, I think I know what I need...a for loop in one db column. How to do t his...I'm still searching.
  5. Confusing I know. Here's what I've got. I used the Dreamweaver Developer Toolbox in a form that has multiple checkbox results entered into one db column. Id's are entered into this column that join with another table to connect the text to these id's. So the column looks like this: 1,5,7,8. The corresponding text is red, blue, green, yellow. I'm using the str_replace to change the comma to a <BR> so the results read in separate rows. Where I'm drawing a blank is how to show all these results as text. So far I've only been successful showing this: 1 5 7 8 And only the first result as text (red). I'd like the results to look like this: red blue green yellow I'll take any help pointing me in a correct direction. Thanks!
  6. hello, Got a rookie question for you. I've got a variable "wait.for.me". Is there a way that I can break this up into three variables? var1 = wait, var2 = for and var3 = me I'm just not sure of the terminology to search for this. Split string? Thanks!
  7. I HATE it when I forget the obvious! I will be continuing to add to this table, so there will be stories for issue_num 5, 6, etc... Thanks!
  8. Here's the information in my table: id........name........issue_num........lead_story 1........Story1......1....................Yes 2........Story2......1....................No 3........Story3......1....................No 4........Story4......2....................Yes 5........Story5......2....................No 6........Story6......2....................No On my main page, I need two queries. One I've got figured out...that's calling the main story. Easy just query all the story id's in desc order and limit 1. The second query I haven't figured out yet. I need to call all the stories with the latest issue_num. This is for the sidebar of the page. So the main story (id1 or id4) is on the page and in the sidebar, are links to the other stories with the same issue num (if main is id1, then the titles to id2 and id3 would appear in the sidebar). Any chance this is a relatively simple query and I'm jsut missing something obvious? Thanks!
  9. The fields in the popup form that will end up in one db column won't need to be updated. So I'm just trying to save db space. And I just want to see if this is doable. I forgot to mention earlier that I'm using PHP.
  10. Hello, I might be in over my head but I figure why not ask for help. I have two forms. A main form with a few text fields. Inside this form is a link to a popup form where the user fills in a few text fields. When this popup form is submitted, I want the information to be submitted as an array to one variable and when the main form is submitted, the popup info is submitted into a hidden field. Here's the breakdown: Main Form has these text fields: >name >email link to popup form Popup Form has these text fields: >field1 >field2 >field3 >field4 When submitted, the popup window closes and this information carries back over to the Main Form and through a hidden field. So in the end, the fields in the Main Form are: >name >email >popupinfo (this hidden field stores the combined values of the popup form = field1, field2, field3, field4) This Main Form ends up being stored in a mySql db. Is this way too complicated?
  11. Hello, I've got an insert/update form (created using dreamweaver developer toolbox). That part was easy, however I'm stuck on this particular validation. When I click the Insert button, here's what I need to have happen: ...check the db table the info is being entered into (dlog_test) to see if any records contain the same time (time_dal) and date (date_dal). If there are records with the same time and date and the number of rows of records = 3, then I need an error message to appear and say "This timeslot is already filled." I'm just not having any success with what I've tried so far. I'm hoping this code below is close...I have this code in my Custom Trigger. $query = "SELECT COUNT(*) AS NUMBER FROM dlog_test WHERE dlog_test.time_dal = ".KT_escapeForSql($tNG->getColumnValue("time_dal"),$tNG->getColumnType("time_dal"))." AND dlog_test.date_dal = ".KT_escapeForSql($tNG->getColumnValue("date_dal"),$tNG->getColumnType("date_dal")); $result = $row_rsCount == 2; if(!$result) { $error = new tNG_error("Timeslot is filled!",array(),array()); return $error; } Any chance I'm on the right track? Thanks!
×
×
  • 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.