-
Posts
24,605 -
Joined
-
Last visited
-
Days Won
830
Everything posted by Barand
-
Confirm Form Resubmission when refreshing browser
Barand replied to davinci29's topic in PHP Coding Help
Interesting. -
I do not see anything in your attached image that could not be produced simply with FPDF.
-
try SELECT parent.name as parent , GROUP_CONCAT(child.name) as children FROM parent JOIN child USING (familyID) GROUP BY parent.familyID;
-
Do the A and B weeks alternate? If they do then just setting whether the first is A or B should suffice.
-
or you could look up the syntax in the manual http://dev.mysql.com/doc/refman/5.6/en/fulltext-search.html#function_match
-
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 | +------------+--------------------------------------------------------------------------+
-
I'm stuck with access.mdb need help with this code
Barand replied to dlbDennis's topic in PHP Coding Help
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. -
I'm stuck with access.mdb need help with this code
Barand replied to dlbDennis's topic in PHP Coding Help
You have been told what's wrong. -
No - I think your problem was probably the "." in schedule.date. But checking error messages would confirm.
-
BTW, have you checked for any error messages yet?
-
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.
-
on t4.schedule.date > '$today' WHERE t1.schedule.date < '$week' "; ^ ^ | |
-
Probably because of query errors. Check what $conn->error contains. Are you sure about the last join and the where condition?
-
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.
-
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?
-
Not a facility I have ever used but is this what you are looking for? Settings/Run & Debug/SRV Web Server/Server mappings
-
Sorry, I don't. You could try contacting the Support team at Nusphere.
-
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)
-
That raises the question "Why are you storing the role in two different places?"
-
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.
-
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
-
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
-
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.
-
What is the output from the bb subquery? You have only shown us the cc subquery half of the join.