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
https://forums.phpfreaks.com/topic/118906-need-some-help/
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
https://forums.phpfreaks.com/topic/118906-need-some-help/#findComment-612288
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.