Jump to content

Adamhumbug

Members
  • Content Count

    286
  • Joined

  • Last visited

Community Reputation

1 Neutral

About Adamhumbug

  • Rank
    Advanced Member

Recent Profile Visitors

2,206 profile views
  1. This unfortunately needs to to be entirely sql if that is even possible. If its not then we are where we are.
  2. I agree that this is less than ideal. As horrible as it sounds, would i be able to substring them and str_to_date them to get some of the way there?
  3. HI All, I have some dates stored as a comma sep string in a database (col = adates) The contents looks like the below 2021-04-04 07:00,2021-04-05 07:00,2021-04-06 07:00,2021-04-07 07:00,2021-04-08 07:00,2021-04-09 07:00,2021-04-10 07:00,2021-04-11 07:00,2021-04-12 07:00,2021-04-13 07:00 I am trying to select rows with 10 dates or less that are consecutive. I have done the number of dates with char_count but am struggling with the consecutive part. The table structure is id, azones Any help with this will be really appreciated as i will also need t
  4. I dont have access to the ajax function, just a function that runs at the end. I know this is pretty ambiguous but the system i am using i dont have access to the source. I have created another button that just runs the function and i click that when i can see everything is in the DOM and it still wont log (each ran) so it still cannot find the elements. But again, when i paste the code into console, i get the desired effect.
  5. If i run this line manually in the console, i get the correct number of rows showing $("[id^='OPRow']").length and if i run my function (without the function part) in console, i get the correct outcome. $("[id^='OPRow']").each(function(index, value){ console.log('each ran') var fn = $("[id^='op_firstname']", this) var ln = $("[id^='op_lastname']", this) var nation = $("[id^='op_nationality']", this) var mobile = $("input[id^='op_t1']", this) var cc = $("select[id^='op_t1d']", this) var role = $("[id^='op_role']", this) var e1 = $("[id^='op_e1']", this) var fnlabel
  6. Just to add some more clarification here. The new line is created with AJAX and i have called my function bootRow() at the end of the AJAX which i can see running in the console logs. What is not happening is the second log inside the each function suggesting that the each function is not finding the id when i can see it several times when inspecting the code and can see several of these lines on the screen. The $("[id^='OPRow']").length that i have always returns 0
  7. Perfect, thanks so much, that really helped. Has led me into another issue however (another thread). Unrelated to this answer which is perfect.
  8. Hi, I have a form to collect personal data, fn, ln, email etc. There is a button that creates a new blank line for you to fill out with another persons data. I am wanting to turn this form into a nice bootstrap layout (i have that bit sorted). This worked in my testing environment when i copied some html over (not created from the button). When you click the button you get a line like this. <tr id="OPRow605b06bd13161" class=""> <td class="BRFOPRowPhotoPreviewCell"> <input type="hidden" name="OPID605b06bd13161" id="OPID605b06bd13161" value="New">
  9. Something like this might be useful as a point to start with - this is jquery by the way $('#element').on('change', function(){ //do stuff })
  10. I think i have fixed this. Added "as newtime" after the ",time" in your example and that seems to be working when i use "newtime" in the where clause. Thanks so much as every for your continued support!!
  11. This is really useful, thanks so much. As always, one more issue. I am getting an error in the where clause. My where clause is WHERE concat(newdate, ' ', extractvalue(pr_customfields,'/CUSTOMFIELDS/CF[@CFN="TestedTime"]/@CFV')) < NOW() - INTERVAL 36 HOUR; I am getting the error - Unknown column 'pr_customfields' in 'where clause' I think the issue may have something to do with the coma in the concat but i have replaces all of your istances of "time" with the above and "date" with something very similar. The data is stored in xml in the database in the follow
  12. I have one varchar column. Unfortunately i am unable to change the table structure and have to deal with one varchar for date and one varchar for time. An example of the data is below
  13. I have a table that has dates stored in various formats (2021-03-12, 12 Mar 2021). I also have a time stored as a string (07:00) I am wanting to convert the dates in their various formats into one that can be concatonated with the time so that i can find any date/times that are 36 hours old or more. I am pretty stuck with this after trying many different ways and would really appreciate a helping hand on this. Thanks in advance.
  14. Hi, I am trying to move an element with JQ. I am wanting to add the input box to some appended content to a page. My code is below: $("[id^='OPRow']").each(function(index, value){ var fn = $("[id^='op_firstname']", this) console.log(fn) var ln = $("[id^='op_lastname']", this) var nation = $("[id^='op_nationality']", this) var mobile = $("input [id^='op_t1']", this) var cc = $("select [id^='op_t1d']", this) var role = $("[id^='op_role']", this) var e1 = $("select [id^='op_e1']", this) var cc = $("select [id^='op_t1d']", this) $('.content').app
  15. Thanks so much for your reply as always! Will the IFNULL be used in the maths at the bottom of this query? (ptsl_limit - IFNULL(used, 0)
×
×
  • 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.