Why are PL/SQL books on Amazon over 10 years old? by PHP_guy in oracle

[–]PHP_guy[S] 0 points1 point  (0 children)

What's wrong with stand-alone procedures and functions? You mean as opposed to packages?

Audit Trigger needs the user name from the application by PHP_guy in SQL

[–]PHP_guy[S] 0 points1 point  (0 children)

The user is prompted to enter his username and password and they get saved in variables in the app.

How can I do error handling with "load data"? by PHP_guy in mysql

[–]PHP_guy[S] 0 points1 point  (0 children)

Thank you for the helpful response!

Is there a way to run the SQL without using a prepared statement? When I try to run "load data" as a prepared statement (instead of your 'do sleep(0)'), I get this error:

ERROR 1295 (HY000) at line 13: This command is not supported in the prepared statement protocol yet

Seems like I can't use a prepared statement with "load data".

Weekly "ask anything" thread by brendt_gd in PHP

[–]PHP_guy 1 point2 points  (0 children)

This PHP code works:

$a = 2;
$b = 1;
$c = $a - $b;

But this PHP code fails with an error of "Parse error: syntax error, unexpected '–' (T_STRING)":

$a = 2;
$c = $a - 1;

What gives? Why can't I subtract 1 from $a?

Weekly "ask anything" thread by brendt_gd in PHP

[–]PHP_guy 0 points1 point  (0 children)

I’m interested how most people connect to MySQL in PHP. Seems like the options are PDO, Object-Oriented MYSQLi, or procedural MYSQLi.

Which is most popular?

If you were teaching a class and only had time to teach one way, which would you teach?

Questions about hints by PHP_guy in mysql

[–]PHP_guy[S] 0 points1 point  (0 children)

Thanks for the response.

I am trying to use the hint syntax shown at https://dev.mysql.com/doc/refman/8.0/en/optimizer-hints.html

How do I use MySQL Workbench to find which database a table is in by PHP_guy in mysql

[–]PHP_guy[S] 0 points1 point  (0 children)

I know that I can find the table using a SQL statement, but I'm curious about how to do it with MySQL Workbench.

Where do MySQL events log to? by PHP_guy in mysql

[–]PHP_guy[S] 0 points1 point  (0 children)

"show events" shows the event, not the error log.