Re: Using Database (PHP)
| From: | Jigar Dhulla | Date: | Mon, 13 Jul 2020 17:17:48 +0000 |
| Subject: | Re: Using Database (PHP) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-327227@lists.php.net to get a copy of this message | ||
On Mon, Jul 13, 2020, 3:38 PM Ashkar Dev <ashkardev@gmail.com> wrote:
> Does anyone have an answer?
>
> I have developed a web application, I used (pg_query) for working with the
>> database:
>>
>> 1. should I convert all (pg_query) to (pg_query_params) or to (PDO)?
>> 2. whats different between all these three types?
>> 3. when it is necessary to use (pg_prepare)?
>>
>> Thanks.
>>
> Pdo is recommended if you plan to switch to other database. And
parameterized queries are better as it prevents SQL injection (attack).
>