Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/06/2023 in all areas

  1. If you always, always, always retrieve and use that comma-separated text as a single unit and never, ever, ever query individual elements of it then (and only then) you can store it in a single field. Treat it like a BLOB and you can store it like a BLOB. As soon as you suspect that you might, one day, possibly, want to find those records that have one (or more) of these elements in them, then you absolutely must store the data "properly" and split it out into separate tables, as others have described. Failing to do so will give you major problems in finding the data, most of them relating to performance as you Table-Scan through millions of records, substring-ing into this field for each and every one of them. Remember, relational databases are really, really good at finding little bits of stuff and bolting them together. They are generally pretty rubbish at finding big chunks of stuff and pulling them apart. Regards, Phill W.
    1 point
  2. <?php try { // connect to OVHcloud Public Cloud Databases for MongoDB (cluster in version 4.4, MongoDB PHP Extension in 1.8.1) $m = new MongoDB\Driver\Manager('mongodb://localhost:27017'); echo "Connection to database successfully"; // display the content of the driver, for diagnosis purpose var_dump($m); } catch (Throwable $e) { // catch throwables when the connection is not a success echo "Captured Throwable for connection : " . $e->getMessage() . PHP_EOL; } Solved, thanks
    1 point
This leaderboard is set to New York/GMT-04: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.