Jump to content

Barand

Moderators
  • Posts

    24,605
  • Joined

  • Last visited

  • Days Won

    830

Everything posted by Barand

  1. I do not see anything in your attached image that could not be produced simply with FPDF.
  2. All true. In history I learnt that King Alfred burnt the cakes, but no use crying over over spilt milk. But I'm from the other side of the pond.
  3. try SELECT parent.name as parent , GROUP_CONCAT(child.name) as children FROM parent JOIN child USING (familyID) GROUP BY parent.familyID;
  4. Do the A and B weeks alternate? If they do then just setting whether the first is A or B should suffice.
  5. or you could look up the syntax in the manual http://dev.mysql.com/doc/refman/5.6/en/fulltext-search.html#function_match
  6. SELECT * FROM mytable; +------------+--------------------------------------------------------------------------+ | mytable_id | link | +------------+--------------------------------------------------------------------------+ | 1 | [url]https://www.youtube.com/watch?v=ABC123[/url] | | 2 | [url]http://www.google.com/watch?q=SQL REPLACE[/url] | | 3 | [url]http://dev.mysql.com/doc/refman/5.6/en/functions.html[/url] | | 4 | [url]https://www.youtube.com/watch?v=XYZ789[/url] | +------------+--------------------------------------------------------------------------+ UPDATE mytable SET link = REPLACE(REPLACE(link, '[/url]', ''), '[url]', '') WHERE INSTR(link, 'www.youtube.com'); SELECT * FROM mytable; +------------+--------------------------------------------------------------------------+ | mytable_id | link | +------------+--------------------------------------------------------------------------+ | 1 | https://www.youtube.com/watch?v=ABC123 | | 2 | [url]http://www.google.com/watch?q=SQL REPLACE[/url] | | 3 | [url]http://dev.mysql.com/doc/refman/5.6/en/functions.html[/url] | | 4 | https://www.youtube.com/watch?v=XYZ789 | +------------+--------------------------------------------------------------------------+
  7. Even though you can see the information that you want in the contents of that var_dump() after the first odbc_fetch_array($result) ? I'll - type- slowly - for - you - You - have - the - results - after - that - first - fetch. - After - that - there- are - no - more - records - left - to - fetch - so - the - results - of - the - next - fetch - are - empty.
  8. You have been told what's wrong.
  9. Barand

    Join

    No - I think your problem was probably the "." in schedule.date. But checking error messages would confirm.
  10. Barand

    Join

    BTW, have you checked for any error messages yet?
  11. Barand

    Join

    Why the join to schedule t4? Why not just WHERE t1.schedule_date > '$today' AND t1.schedule_date < '$week' And you should be using a prepared statement instead of dropping values into the query.
  12. Barand

    Join

    on t4.schedule.date > '$today' WHERE t1.schedule.date < '$week' "; ^ ^ | |
  13. Barand

    Join

    Probably because of query errors. Check what $conn->error contains. Are you sure about the last join and the where condition?
  14. That you were not making it clear was a statement of fact. It was not a statement of blame that it was deliberate, rather one of inadequacy. You gave us four tables and claimed that the hierarchical relationship was obvious. Well, without indicating the relationships between those tables, it wasn't. In the tables you have "aid" and "mid" columns, which look like foreign keys, but your inadequate naming convention gave absolutely no clues about what they referenced. And your pyramid diagram was a complete mystery until you later told us what it represented. Until then we had to guess. Plus there are other mysteries in there that Benanamen has indicated.
  15. Glad you dropped by this thread, Jacques. Can you explain to us (ajoo isn't making it very clear) how your data model shown in reply#22 above implements the required checks and constraints for this process?
  16. Not a facility I have ever used but is this what you are looking for? Settings/Run & Debug/SRV Web Server/Server mappings
  17. Sorry, I don't. You could try contacting the Support team at Nusphere.
  18. PHPEd allows you to specify POST values Select "Run/Parameters" from the menu and enter the parameter names and values with type=post. Run the script using either the embedded IE or embedded Mozilla browsers (doesn't work with with embedded Chrome for some reason)
  19. That raises the question "Why are you storing the role in two different places?"
  20. Are you really sure that is what you wanted. You have two "role" columns which have the same value in the output. I suspect they had different input values before the joins. Change the alias name.
  21. Probably, but we do not know what you are trying to do. We only know your attempted solution, which is failing. And, as benanamen requested, we don't have your data
  22. GROUP BY role will give you a single row for each role. As you have two rows in each role, that single grouped role record can only contain one of the ids (usually the first, but not guaranteed to be). This will explain why you only get matches on ids 94, 97, 98 when the group by is used in the second subquery
  23. Without knowing the structures of the three tables I couldn't comment. If the three structures are identical then that would flag a problem. The presence of a UNION keyword is insufficient evidence on its own. There are valid reasons for using UNION - that's why it exists. Consider a college scenario. Two tables, pupil and lecturer. In the event of a fire in one of the buildings, the fire department asks for a list of names of who is scheduled to be in the building. There is going to be union in there somewhere.
  24. What is the output from the bb subquery? You have only shown us the cc subquery half of the join.
×
×
  • 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.