Lipsa
Lipsa

Reputation: 417

how to insert data to table by store procedure with session value?

This is a stored procedure in mysql database.

I tried mysql_query($connection, "CALL xyz") but shows me error.

by store procedure I want to insert data to table

I want insert data from session values in my php page.

Upvotes: 0

Views: 190

Answers (1)

Maltronic
Maltronic

Reputation: 1802

Stored procedures can be called using the CALL keyword. The first procedure you list would be called with parameters similar to this:

$mysqli = new mysqli('localhost', 'user', 'password', 'database');
$mysqli->query("CALL p_maintain_user('i', 123, 123, 'password', 'a')");

The PHP website provides an article with more information on this.

Upvotes: 1

Related Questions