Skip to content
Advertisement

Tag: php

Query only doing half of what I want

I have a function that is supposed to delete a product and, with it, delete its stock as well. But it keeps just deleting the stock. SSometimes I change the order of the querys and it shows an error that I can’t delete idproduto because its an FK, so I put the delete stock query first. It deletes the stock

Connecting to multiple MySQL database in single php app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 1 year ago. Improve this question I’m trying to connect multiple mysql databases to a single php web app. I’d like each user to be able

How to set pdo timezone at connection

I have this code where I connect to database and the code is working properly. However the now() function of MySQL is out of sync with PHP set default time zone function. I am comparing the PHP date with MySQL now. Therefore, I wanted to set the database time zone as well. I wanted to set the database time upon

Advertisement