Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/28/2021 in all areas

  1. As I said, you're doing it wrong, from step 1. Downloading the library is the "old" way of managing your libraries, there's no need for downloading it manually if you're using composer. If you want to use composer then you need to start by creating your own composer.json file for your project. Use composer init to create your initial json file. mkdir chenxiu-doghouse cd chenxiu-doghouse composer init Then you require the library you want to use by it's identifier. It's identifier should exist in its composer.json file. The name may also be mentioned in the readme or found on packagist.org. composer require doghouse/doghouse-master-api If the library is not listed on packagist.org (ie, private/proprietary library) then you may need to add the repositories entry into your composer.json file before you can require it.
    1 point
  2. You know those times where explaining your issue gets you to think about it a different way and you immediately solve your problem? Yeah. For anyone that happens across this with a similar issue, the problem was that the value being inserted was '', not null. So the duplicate entry was actually valid. I created a mutator in the model to return an actual null value if the attendee_code is empty, and everything works as expected now. Thanks again to this forum for being my eternal rubber ducky.
    1 point
  3. there's no need to compare, in php code, the column value fetched from the query with the column value being tested in the where clause. if the query matched a row(s) of data, the where clause was true. next, if you are not actually using the row(s) of data that a query matches, i.e. you are only testing if a value exists or how many times it exists, use SELECT COUNT(*) ..., and if this is for a 'registration' script, where you are deciding if you are going to insert a row of data, instead, just define that column as a unique index, attempt to insert the data, then test if the query produced a duplicate error. lastly, if you switch to the much simpler PDO database extension, a majority of the lines of code will go away.
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • 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.