Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


NotionCommotion last won the day on July 2 2019

NotionCommotion had the most liked content!

Community Reputation

32 Good

About NotionCommotion

  • Rank
    Prolific Member

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Using postgresql, not mysql. michael=# \d information_schema.key_column_usage View "information_schema.key_column_usage" Column | Type | Collation | Nullable | Default -------------------------------+------------------------------------+-----------+----------+--------- constraint_catalog | information_schema.sql_identifier | | | constraint_schema | information_schema.sql_identifier | | | constraint_name | information_schema.sql_i
  2. Good morning Barand, I substituted "separator" with a comma and removed the prepared statement WHERE clause for constraint_schema, however, then found that information_schema.key_column_usage.referenced_column_name doesn't exist for me. Ah, just noticed your "Perhaps". Oh well, appreciate your response regardless.
  3. I am trying to get a list of all foreign key constraints and executed the following: SELECT kcu.table_name, kcu.column_name, rel_tco.table_name fk_table_name, ccu.column_name AS fk_column_name, tc.constraint_name FROM information_schema.table_constraints tc INNER JOIN information_schema.key_column_usage kcu ON tc.constraint_schema = kcu.constraint_schema AND tc.constraint_name = kcu.constraint_name INNER JOIN information_schema.constraint_column_usage AS ccu ON ccu.table_schema = tc.table_schema AND ccu.constraint_name = tc.constraint_name INNER JOIN info
  4. Hi Thomas, No direct answer, but have you tried logging/echoing/whatever at the server what it is receiving regarding url, body, headers, etc? Don't know the answer to your issues, but guarantee that if you are getting different results, you are sending a different request.
  5. If you are truly trying to send ?key={' . api_key . '}&email={' . email . '}, that is your error, and you really want to send ?key=yourApiKey&email=theemail@bla.com;
  6. Thank you requinix. Good to know I got two YESs, one MAYBE, and no NOs! It is not Doctrine I am fighting with. Actually know it pretty well. It is that confounding Symfony and associated bundles. I expect I am in the minority in this position, but I focused on SQL first, then PHP, then Doctrine, and only recently Symfony. For instance, I can easily have Doctrine generated SQL for class table inheritance or One-to-One. Inheritance using CTI CREATE TABLE animal ( id SERIAL NOT NULL, name VARCHAR(255) NOT NULL, sex VARCHAR(255) NOT NULL, weight INT NOT NULL, b
  7. DatabaseCat is the same thing as some would have called EntityCat, and some might have named DatabaseCat's animal() method as getAnimal(), true? And as shown in your BusinessCat's constructor, DatabaseCat $cat contains an instance of DatabaseAnimal. And to get it their in the first place, I would use composition: $databaseAnimal = new DatabaseAnimal($dbAnimProp1, $dpAnimProp1); $databaseCat = new DatabaseCat($dbCatProp1, $dbCatProp2, $databaseAnimal); Just making sure I am on the right page.
  8. What information do you wish to obtain from your array? Assuming your array is named $yourArray, then you can access elements in it using something like $yourArray[0] which will also be an array or $yourArray[0]['id'] which will return 5. Try it out and use either print_r() or var_dump() to view the results.
  9. mysqli_query wants at least two things, right? How many did you give it? Look at the second line of your original post. Now, looking below tells you exactly what it wants. Some sort of link and a query and an optional resultmode (in that order). Which one didn't you give it? mysqli_query ( mysqli $link , string $query , int $resultmode = MYSQLI_STORE_RESULT ) : mixed
  10. What does model, view, controller, business model, service, presenter, action, domain, responder, router, mapper, entity, database model all have in common? They are all stuff! I definitely have a hard time keeping them all straight. Which is part of the problem. This API-Platform thing takes care of all the CRUD business logic as well as generating OpenAPI definitions, and then there are hooks to perform application specific business. I suppose I can find some other place to make the inheritance happen but then would be totally deviating from the intended approach. Well, actually ma
  11. Please read the following, and tell me what it says in your own words. Fatal error: Uncaught ArgumentCountError: mysqli_query() expects at least 2 arguments, 1 given
  12. First look at what error message PHP send you. Then take a look at https://www.php.net/manual/en/mysqli.query.php You are doing the procedural (non OOP) version. mysqli_query ( mysqli $link , string $query , int $resultmode = MYSQLI_STORE_RESULT ) : mixed When you call a function or method, you need to provide something for all the arguments (i.e. inputs to the function) unless the input is followed by "=someDefaultValue". So, you don't send the just the query but first the mysqli link and then the query.
  13. Where do you think all the Labadoodle cam from? Regardless, agree it is way to much. Was driving home last night and realized why some dislike too abstract of examples. Attempting to model life itself with a couple classes? Sure, we can extend a couple classes and have an academic run() and speak() method, but quickly breaks down. And for composition, suppose I would need to inject about a billion objects to even pretend to be doing so. Was hoping to add this before your response. Can't totally blame myself, however. Went online to look for examples and just about every one has to do w
  14. I was envisioning something like the following where $dog = new Animal(new DogDna());. I guess I still have the issue of inheritance at the DNA level as I would need a many-to-one relationship between animal and abstractDna, but hopefully less of an issue as it is a more isolated scope. class Animal { /** * @var DnaInterface */ private DnaInterface $dna; public function __construct(DnaInterface $dna) { $this->dna = $dna; } public function run() { $this->dna->run(); } } Humm, Initially, thought it looked of
  15. I am using API-Platform, Doctrine, and Symfony with entities that utilize class type inheritance to extend an abstract entity. I've been running into one issue after another primarily related to the serialization process (serialization groups, parent annotations not propagated to the child, etc), and while I am sure user error on my part is part of the culprit, it appears that API-Platform and potentially Symfony and Doctrine don't fully support entity inheritance. My reason for thinking so is the incredibly sparse amount of documentation on the subject and remarks on quite a few github
  • 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.