Re: [PHP-DB] PHP mysqli is NOT trapping some errors when calling stored procedure

2019-02-12 Thread Venkat Hariharan
Yes, I do have all reqd privs.

In fact, as long as a duplicate key situation isnt encountered, I am able
to invoke the stored proc from PHP alright and the record gets saved in the
database.

But when I try to re-do it using the same value (thereby I am expecting
that 1062-DUPLICATE KEY error will be thrown and caught by PHP), I dont get
any error from PHP!

In mysql client or MySQL Workbench, I do see the error. when I invoke the
stored proc.

Thanks,
Venkat


On Tue, Feb 12, 2019 at 9:56 PM Aziz Saleh  wrote:

> Do you have sufficient privileges to execute stored procedures
> (procs_priv) on PHP's end?
>
> On Tue, Feb 12, 2019 at 11:07 AM Venkat Hariharan 
> wrote:
>
>> Can you take a look at the issue that I've described at
>>
>> https://stackoverflow.com/questions/54643704/php-mysqli-is-not-trapping-some-errors-when-calling-stored-procedure
>> and tell me what I am missing in my PHP code ?
>>
>> To summarize: I am calling a MySQL stored procedure from PHP that does
>> some
>> DMLs (using mysqli). But the problem is that PHP is not able to get
>> intimated of some database error conditions raised by the stored proc
>> (which I know are raised, bcoz they do get flagged when invoked from a
>> mysql client)
>>
>> I've listed the relevant code fragments there. Am I not using mysqli
>> correctly?
>>
>> Thanks,
>> Venkat
>>
>


Re: [PHP-DB] PHP mysqli is NOT trapping some errors when calling stored procedure

2019-02-12 Thread Aziz Saleh
Do you have sufficient privileges to execute stored procedures (procs_priv)
on PHP's end?

On Tue, Feb 12, 2019 at 11:07 AM Venkat Hariharan 
wrote:

> Can you take a look at the issue that I've described at
>
> https://stackoverflow.com/questions/54643704/php-mysqli-is-not-trapping-some-errors-when-calling-stored-procedure
> and tell me what I am missing in my PHP code ?
>
> To summarize: I am calling a MySQL stored procedure from PHP that does some
> DMLs (using mysqli). But the problem is that PHP is not able to get
> intimated of some database error conditions raised by the stored proc
> (which I know are raised, bcoz they do get flagged when invoked from a
> mysql client)
>
> I've listed the relevant code fragments there. Am I not using mysqli
> correctly?
>
> Thanks,
> Venkat
>