DELIMITER $$
DROP PROCEDURE IF EXISTS `users` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `users`(in id int(25))
BEGIN
declare empcode varchar(25);
set empcode=(select emp_code from transaction_user_register where t_reg_id=id);
delete from transaction_user_register where t_reg_id=id and emp_code=empcode;
update user_register set active='2' where reg_id=id and emp_code=empcode;
END $$
DELIMITER ;
如何通過從PHP頁面的ID ....如何將參數值從PHP頁面
我打電話從PHP頁面
的過程傳遞我不知道怎麼傳參數值...
既然你利用,而不是interpo的mysqli
使用prepared statements我寫這樣
<? require_once"db.php";
echo $id = $_REQUEST['t_reg_id'];
$connt = mysql_connect($server1, $user1, $pass1, $dbname1) or die ("__construct() Function Problem => ". mysqli_error());
$resr= mysql_query($connt,"CALL users('$id')");
mysql_close($connt);
echo "Cron Job Run Succesfully........";
?>
通過發送這樣的,你得到任何錯誤? –
只是一個建議,你不應該採取'$ _REQUEST []'值,並直接在你的'mysqli_query'中使用它們,我相信這是一個安全風險 –
我不知道如何傳遞id值 – user2786525