Jump to content

cpd

Members
  • Posts

    883
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by cpd

  1. Thanks for pointing that out Barand, I clearly skipped over that in the documentation.
  2. I salute you for being so persistent - very well done. There are many individuals who give up at the first error but through your persistence you've corrected it and learnt a lot.
  3. I'm not sure what your definition of "driver" is but it sounds like you want to test if content is loaded? You can use jQuery as it simplifies things - may be overkill for one task though - or alternatively write a small object to create the request etc. Can't really help other than that as you've not attempted anything.
  4. $breadcrumbs = ... $breadcrumbs = array_filter($breadcrumbs, function($v) { return ($v != ""); }); implode...
  5. You clearly copied and pasted the code... Review the parenthesis. As its a very simple problem to solve I'm definitely not posting the answer
  6. I can think of plenty. Normally, you would assign ID's to wrappers and sub wrappers. For example you could give an ID to your "header", "body" and "footer" to easily identify them. You can then give an ID to your "navigation" wrapper (sub wrapper). An example of something you may not bother giving an ID to is a ul tag and possibly li tags inside your navigation - this is obviously dependent on how your navigation works, though. That's the rule of thumb I work on.
  7. You can do it with a single application - the logic is pretty much the same but the views are different. Having taken a look at CI I'd also recommend moving away from it as its architecture is complete rubbish.
  8. I also should have asked if 503 throws an error. Exceptions are thrown when there is a SoapClient error not if there's an HTTP 503 response. Are you trying to reach a wsdl file or something else? And why are you concerned about handling the error as opposed to finding out why its giving a 503 response? Are you doing this on purpose?
  9. cpd

    Sorting an array

    Because that's completely logical, durrr. You can sort the alphanumeric sting using the strnatcmp($str1, $str2) function. It's a natural order comparison.
  10. Try for PHP 5.4. $this->client = new SoapClient($this->clientUrl, ['exceptions' => true]);
  11. You get the original error because your passing the results into the mysqli_errno() method instead of the connection as you do in your first use. mysqli_errno($conn); // NOT mysqli_errno($results); That specific error has nothing to do with your query although I expect its being triggered through your query failing.
  12. I've just created a similar database based on your query and written the following to retrieve the necessary data. SELECT `ft`.`title`, `opening_post_user`.`name`, ( SELECT `name` FROM `forum_post` `fp` INNER JOIN `user` `last_post_user` ON `last_post_user`.`id` = `fp`.`userId` WHERE `fp`.`forumTopicId` = `ft`.`id` ORDER BY `fp`.`id` DESC LIMIT 1 ) `last_post_name` FROM `forum_topic` `ft` INNER JOIN `user` `opening_post_user` ON `opening_post_user`.`id` = `ft`.`userId` It does use a sub-query but in this instance I feel its fine.
  13. You should really be using inner join to save resources.
  14. cpd

    TD fade effect

    It doesn't really because document is a part of window but I just didn't see the need for it; and I was just curious as to why, clearly
  15. What you've done is created a UNIQUE constraint on two columns, not individually i.e. both the `username` and the `email` combined must be unique. E.g. Valid entries Username Email cpd cpd@phpfreaks.com cpd iam@phpfreaks.com Invalid entries Username Email cpd cpd@phpfreaks.com cpd cpd@phpfreaks.com You need to edit the constraint and remove the email, then add a new unique constraint on the email column. Edit: I don't know why there's soo much whitespace.... Edit: the nl2br (or similar) function was screwing up the post!!!!
  16. You're better off writing a calculator in Javascript - so I'm agreeing with the critics. Due to the RESTful nature of the web your calculator (client) has to send requests to the calculator processing pages (server) every time you want to make a calculation i.e. the page has to refresh every time you click a button and store what you clicked somewhere for use later. That in itself is a nightmare. You'd find it easier, in my honest opinion, to use Javascript.
  17. CodeIgniter just takes everything and shoves it into a super object - its extreme globalisation with a raincoat. I can sympathise with Electro808 with regards to the time it takes to fully learn a framework, the only way to do it is to practice though. That said the time lapse between the OP and his brick wall is 7 days: you can't expect to fully learn a framework in 7 days unless you work at it non-stop. I think you need to spend more time on it.
  18. cpd

    code problem

    my eyes hurt. Why would you not use an array for your answers as suggested by requinix. You can't get a more perfect example where you should use an array. Cycle through the array with a foreach loop and raise a flag when something is empty - probably 1/3 the code you have there and way more efficient.
  19. Cool story bro. Wana tell me another that describes what method of session management your using, what code you've written yourself, the steps you've taken to find the error (debugging), whether the system uses the database to track sessions? I reckon that would be a really good one.
  20. I'd love to know what debugging steps you've taken so far? That said you need to learn how to correctly select a form. form = document.forms["TheNameOfMyForm"]; Why have you got an HTML 3.2 DOCTYPE as well? Out of curiosity.
  21. What have you done to isolate your error? See the "+Indexes" link right below the table structure "Add new columns" section - click it and see what's in there, is the username field unique?
  22. cpd

    TD fade effect

    You shouldn't need window.document.querySelectorAll(). The document object inherits this method so document.querySelectorAll() should be just fine.
  23. cpd

    TD fade effect

    You could fade the contents of the table-data tag and then remove the tag from the DOM. jQuery can do this easily. It would be best if you go away and have a mess around.
×
×
  • 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.