Jump to content

NigelRel3

Members
  • Content count

    69
  • Joined

  • Last visited

Community Reputation

4 Neutral

About NigelRel3

  • Rank
    ( ͡° ͜ʖ ͡°)
  1. NigelRel3

    Why my basic insertion won't work?

    You are trying to insert into 3 values for your insert statement and bind only 1.
  2. I've managed to sort of a simple REST test, which uses a standard model with a single field for the key. I've also managed to get Eloquent to deal with composite key models. Now I want to see how I can put them both together - in the simplest way possible! So i would like it to fit into the standard Route::resource('/Bin', 'RestBinController'); This only seems to expect a single parameter and so if I try /api/Bin/1/2 it doesn't recognise the path. I could split it out into the get/post... methods (and it may come down to this) but I wanted to check if I was missing something before I did this.
  3. NigelRel3

    Help needed in select command using table A and B

    I think it's better to maintain the same case anyway - using Linux a lot means you tend to get used to the fact that case matters in a lot of things (which is why table names can be case sensitive) I'm a fan of camel case and I think it makes things more readable - but inconsistent use of case for the same field can (IMHO) lead to confusion.
  4. NigelRel3

    Help needed in select command using table A and B

    Although consistency of names IMHO is important, just to clarify ( from https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html ) Column, index, stored routine, and event names are not case sensitive on any platform, nor are column aliases.
  5. NigelRel3

    In laravel 5.4 retrieving with several criteria

    You could build an array of conditions, where can take something like... $binT = \App\BinType::where([['binTypeID', '>', 1], ['sizeX', '<', 10]])->get(); So if you get to the end of all the possible conditions, you can make a choice of including the where only when you know there are criteria to use.
  6. NigelRel3

    no data going to sql

    Have you looked at using HTML5 required attribute - this will do a lot of the work for you!
  7. NigelRel3

    Embedding an Already Built App into Laravel Framework

    Surely the whole point of moving to Laravel is to integrate with the framework! If OP isn't going to use even parts of the functionality, then why bother with a framework in the first place?
  8. NigelRel3

    Embedding an Already Built App into Laravel Framework

    I have recently been learning Laravel and there is a large change of structure from using a pure PHP app to using the Laravel framework as it's intended. So the answer is (I think) there will be quite a bit of work to change your app over to using Laravel. Is it worth it? Difficult to tell, frameworks offer a lot of features, but if you don't need or use them then they can be overkill. The separation of the views from the controllers and models means that gone are the monolithic pages which handle the display and processing of data. The end result is a more focused set of scripts which help in development, you know if you want to change the display, you may only have to alter the view. This can be a bit more of a pain if your used to 'all my processing for page x is in file x', but helps in other ways.
  9. NigelRel3

    laravel 5.4 with condition in model

    I'm not sure about some of these macros, I know it MAY make the code a bit more compact, but does it make it more maintainable?
  10. The error is very clear - mysqli_error expects a parameter - usually... mysqli_error($connection)
  11. NigelRel3

    Updating an XML template

    TBH - this is what concerns me, you are asking questions about how to work with data and you are writing code which allows payments by credit cards. With all the issues about data breaches and insecure web sites, you are continuing with something which has possibly huge impact on people and their financial details. I'm looking for a junior role as a PHP programmer as I don't have any commercial experience in PHP and yet I see people writing code for web sites which makes me wonder! If your unsure about how something works, write a SMALL test for it, try it and see what happens. If this example fails then work out why, don't try and obfuscate the problem with all of the other stuff around it.
  12. NigelRel3

    Updating an XML template

    Hmmm... as employeeId wasn't even mentioned in your first post, I can't see how the original code 'is the essence of things'.
  13. NigelRel3

    unexpected end of page

    This is a good example of how badly layed out code can make development difficult. If you laid out the code using something like... if(condition) { someotherCode(); } The problems may become obvious.
  14. NigelRel3

    Updating an XML template

    Can you post the actual code (or at least a cut down version) which shows the problem your having. This should work, but without the details it's difficult to comment on.
  15. NigelRel3

    PHP Script to Ping an IP Address

    Interested in what your attempting to achieve? Are you trying to get some form of failover, if so there are some more tried and reliable methods out there.
×

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.