Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

stored procedure doesn't work when is called from php

Despina's profile image Despina posted 3 months ago in General Permalink

HELLO,

I must insert data into a table, using transactions ( rollback and commit).

From HeidiSql works very fine when I'm running routine manually.

Probems:

  1. In HeidiSql I cannot change Create Code in "CREATE OR REPLACE DEFINER....." and because of this, I should run first in php $delpsquery="DROP PROCEDURE IF EXISTS myprocedure";

    $delr=mysql_query($delpsquery) or die("Query failed delpsquery: ".mysql_error());

then I must create myprocedure and call it :

$rs = mysql_query("CALL myprocedure(param1,param2,param3,param4)"); $rs = mysql_query('SELECT messaj FROM bazadate.mesaj ' );

Table mesaj should be created during stored procedure running

But, after "CALL myprocedure....", this table isn't created, so I see that stored procedure is just created not executed !

Please help.

Thank you

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.