PHP - Anyone Recommend Any Oop Training Courses In The Uk?
Hello All,
I currently code in procedural PHP, but am now in a position to start learning OOP in PHP. Now i'm hoping to get my company to pay for a course in the UK (Ideally in the South East/London but if up North or elsewhere then that's fine). Anyone been to any training courses or heard of any that they can recommend and can post the links to? Thanks Similar TutorialsHi All
I am having problems running a query to get the courses a student is enrolled for.
The format I need is somthing like this:
firstname - lastname - course ------------------------------------------- Joe Bloke US232456 Joe Bloke US554665 Joe Bloke US332098or like this firstname - lastname - course ------------------------------------------------- Joe Bloke US232456 US554665 US332098The query I am running is SELECT usr.firstname, usr.lastname, c.shortname FROM mdl_course c INNER JOIN mdl_context cx ON c.id = cx.instanceid AND cx.contextlevel = '50' INNER JOIN mdl_role_assignments ra ON cx.id = ra.contextid INNER JOIN mdl_role r ON ra.roleid = r.id INNER JOIN mdl_user usr ON ra.userid = usr.id WHERE r.name = 'Learner' AND usr.firstname = 'G01 Moloko' ORDER BY usr.firstname, c.shortnameThe problem is that I know this student is enrolled for 3 courses, but it only returns 1 course. Any help is welcomed. huck This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=310661.0 Well I am working on this new site for fun I don't have any of the development done for you to even look at but I am here trying to see what others would recommend to solving on issue that I have. Ok, well basically what I want to be able to do is allow for other users of the site to "like" a comment that another member has made, and I want to keep track of how many people clicked the link and do what I can to not let them click the like again. What I can see for two options are to 1) in the comment table keep a number that increments every time someone clicks it, and then in a cookie tell the site the link has been clicked so the user does not see the like anymore, but then if the user removes the cookie they will be able to click the link again.(Not to big of a deal I guess) or 2) set up a different table that keeps track of the comment and the user so I can then use sql to count the amount of times that the commentID is in the table and then the user would not be able to click the some comment again this way. (But this just seems like a lot of database space that could be taken up) Any recommendations would be great! Thanks I recently had a need to check several arrays, and if an index wasn't set, set a variable to a given value. The code was such that I couldn't perform the isset check all at once. I then thought "wouldn't it be great if I could try the script, and catch the error or warning". Searching a bit, I came across the following script. I am a little nervous, however, that there might be negative consequences of doing so. Thoughts?
set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext) { // error was suppressed with the @-operator if (0 === error_reporting()) { return false; } throw new ErrorException($errstr, 0, $errno, $errfile, $errline); }); try { dns_get_record(); } catch (ErrorException $e) { // ... } looking for suggestions and experiences from those of you that use a Password Manager
This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=334552.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=306605.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=331627.0 Finally getting around to giving Doctrine a try. Looks like YAML is depreciated, so my choices are DocBlocks or XML. I am sure it is personal choice, however, I would like to start off with what most feel is the best path. Any recommendations? Thanks MySQL cannot store Boolean values and thus I use 0/1. Is there much benefit to cast them as Boolean immediately after querying the database, do whatever PHP processing is required, and then convert them back to 0/1 before writing to the database? One benefit is I can type declare my arguments, but I am debating whether it is worth it. Thanks |