How do I execute stored procedures?
Assuming you're using Drupal 7 you can use code like the following:

// Get the Drupal database connection and change the statement class to PDOStatement.
// Save the current class for cleanup later.
$conn = Database::getConnection();
$saved_class = $conn-&gt;getAttribute(PDO::ATTR_STATEMENT_CLASS);
$conn-&gt;setAttribute(PDO::ATTR_STATEMENT_CLASS, array('PDOStatement'));

// Prepare the statement and bind params
$statement = $conn-&gt;prepare("Call GetNodeList(?,?)");

$op_status = $statement-&gt;bindParam(1, $node_type, PDO::PARAM_STR | PDO::PARAM_INPUT_OUTPUT, 25);
$op_status = $statement-&gt;bindParam(2, $publish_state, PDO::PARAM_INT | PDO::PARAM_INPUT_OUTPUT);

// Execute the statement and reset the connection's statement class to the original.
$exec_result = $statement-&gt;execute();
$conn-&gt;setAttribute(PDO::ATTR_STATEMENT_CLASS, $saved_class);

// Get your data
while ($row = $statement-&gt;fetchColumn(0)) {
  // ...
}


That method is completely culled from this article and has worked for me well in the past.