Forum Topic: I might be dumb - PHP

(166 views • 5 replies)

This topic is 1 page long.

<< < > >>
Sad

greenkube

Reply To Post Reply & Quote

Posted at: 10/30/09 12:00 PM

greenkube NEUTRAL LEVEL 12

Sign-Up: 10/24/05

Posts: 562

So I am trying to call a stored function within my SELECT statement using mysql_query in PHP. For some reason it does not return a valid result resource.

Example: (assuming connection is already made)

$query = "SELECT DetermineTestCategoryPath(17)";
$result = mysql_query($query, $this->con);

I get the error:
'mysql_query(): Unable to save result set'

From what I read you should be able to call a stored function directly in the SELECT statement like you normally would with mysql_query(), but for some reason it doesn't work. I have tested the query in MySQL Query Browser and it works perfectly.

Any ideas?

BBS Signature

None

greenkube

Reply To Post Reply & Quote

Posted at: 10/30/09 12:14 PM

greenkube NEUTRAL LEVEL 12

Sign-Up: 10/24/05

Posts: 562

So to answer my own post, I am dumb. Didn't set EXECUTE permissions for the connection user. Sorry for the wasted space/time I just made for anyone :(

BBS Signature

None

urbn

Reply To Post Reply & Quote

Posted at: 10/30/09 01:24 PM

urbn FAB LEVEL 18

Sign-Up: 06/10/07

Posts: 2,301

No worries, at least you posted that you sorted it and how you fixed it.

BBS Signature

None

letiger

Reply To Post Reply & Quote

Posted at: 10/31/09 12:03 PM

letiger DARK LEVEL 16

Sign-Up: 08/06/07

Posts: 3,176

and thats what matters

lol noob

None

Relish

Reply To Post Reply & Quote

Posted at: 10/31/09 02:55 PM

Relish NEUTRAL LEVEL 06

Sign-Up: 01/22/08

Posts: 775

At 10/31/09 12:03 PM, letiger wrote: and thats what matters

lol noob

Go back to the General forum.


None

urbn

Reply To Post Reply & Quote

Posted at: 10/31/09 05:32 PM

urbn FAB LEVEL 18

Sign-Up: 06/10/07

Posts: 2,301

At 10/31/09 12:03 PM, letiger wrote: and thats what matters

Considering you can't edit your own posts, yes... Dick.

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 07:01 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!