Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Barand last won the day on September 20

Barand had the most liked content!

About Barand

Profile Information

Recent Profile Visitors

91,016 profile views

Barand's Achievements

Prolific Member

Prolific Member (5/5)




Community Answers

  1. You need to a way for your js function to specify which popup to show. One way would be to pass the room id in the function call onclick = "myFunction(xx)" and to append the room id to your ids to make them unique id="mypopupxx"
  2. As I said earlier, I don't now think the group_concat_max_len is your problem. I am struggling with your html, trying to get the popup to work for me. I notice you have many elements all with the same id ("mypopup"). Ids must be unique. You are probably getting the same (short list) popup displaying every time, regardless of which room you click.
  3. Your html is displaying all that it is being asked to display. From your html source... <span class="popuptext" id="myPopup"><p class='details'> Amenities: 55 Inch Smart TV<br>Mini-Bar<br>Queen Size Bed<br>Safe<br>Wheel chair access<br>WiFi</p></span> The fault appears to be in the PHP/SQL and not on the client side.
  4. It was just a theory, but as you are displaying about 100 characters your limit would need to be very small for that to be the cause.
  5. What does this query give you? SELECT @@group_concat_max_len;
  6. @aarti789 You may have corrected the grammar but apostrophes in a variable name are not a good idea.
  7. From my first experience above, I came to the conclusion that asp was particularly slow whenever string concatenation was involved.
  8. I started my web programming using ASP but after a while decided to give PHP a go. A couple of examples spring to mind. A simple page which allowed users in one of our departments to view daily comments from a log. One day I had a complaint that the page took 15 seconds to load in the browser. Repeated tests on that day's data gave the same result. The comments on this day were particularly verbose. I wrote a PHP version which, when tested on that same day's data, repeatedly produced the results in just over 0.2 seconds (70x faster). This was an exception but, normally, PHP was better that 3x faster. A page which allowed the public to enter their location and a search radius and it would find the time of all bus services, in the next hour, which departed from stops in the search radius. There was, however, a problem in the city centre with a high stop density. A radius of 200m would cause the whole thing to timeout after 30 seconds. Again a PHP rewrite was tried. Even at a radius of 2000m it displayed all the stops and times within a few seconds - no timing out. Score 2 for PHP. After those my boss stopped objecting to my using PHP. (His objection had been on the grounds that it wasn't a MS product!)
  9. In much the same way as Superman uses kryptonite.
  10. Another way to it is to forget about row_number() OVER etc and, instead, use the simpler SELECT ... , substring_index(GROUP_CONCAT(f.description separator ' &bull; '), ' &bull; ', 5) as rmfac to get the whole list of facilies then select the first 5
  11. It would be if it allowed window functions in WHERE clauses - but it doesn't, so some rewriting needed..
  12. Try getting your 5 facilities for each room in a table subquery. Then join to that subquery on room_id.
  13. Yes. Aliases don't exist at the time the query uses the WHERE clause - they are created on output. So... WHERE rb.room_id IS NULL AND row_number() OVER (order by f.facility_id) <= 5
  14. You cannot use a column alias in a WHERE clause, you need the whole expression
  • 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.