0

I created two triggers for MySQL database. But I want to get the trigger names and statements, but when I try I get back one array of one trigger only with code:

$TriggersOfArray = (mysql_fetch_assoc(mysql_query("SHOW TRIGGERS")));

I tried with \G parameter, but does not work.

Jess Stone
  • 677
  • 8
  • 21

1 Answers1

1

You need to loop over a result set to get all the results. mysql_fetch_assoc() gives you the associative array for the current row only. See here.

Community
  • 1
  • 1
Digital Chris
  • 6,177
  • 1
  • 20
  • 29