Jump to content

Need some help


Dathremar

Recommended Posts

Ok I am into something new (for myself) and unfamiliar. Something i thought that will be like walk in the park suddenly became hard as u can get.

I need to make a web display of some database information which i can retrieve by calling mysql stored procedures. But i get errors when i try to call em like a normal sql querry. Searched the web and came by a php class called mysqli. Can some1 plz give me simple guidelines (tried googling and getting alot of info i really cant understand) on how to make a call to a stored procedure and display the resault.

 

Thx in advance for any kind of info

Link to comment
Share on other sites

The problem is a regular sql query is not working:

 

something like :


$db_response = new db_ticket;// have included mysql class for connection to DB and stuff

if ($_GET['sp'] <> '')
{
$sport_id = $_GET['sp']; 
$string = "CALL liga_menu_list('$sport_id')";
$db_response->query($string);
if ($db_response->nr() > 0)
{
?>
	<option value="">Izberi liga</option>
<?
	while ($db_response->next_record())
	{
?>
		<option value="<?=$db_response->row('liga_id')?>"><?=$db_response->row('opis')?></option>
<?
	}
}
}

 

So when i execute this i get error from the Mysql : "#1312 - PROCEDURE csbets0_klad29.liga_menu_list can't return a result set in the given context";

 

When I tried to google this i got to this MySqli thingy which I dont know how to use. So thats my question.

 

Thx

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.