![]() |
[SOLVED] SQL Help
I am running into a strange problem where the function below is not working:
*Note that $userid is feeding the correct value PHP Code:
Note that the explode works fine in useradmin_update_save where it is fed PHP Code:
Thanks for the help ;) |
My guess is that the array key is TABLE_PREFIX . "user.membergroupids" and not just "membergroupids".
ETA: If that's the problem, the easiest thing to do would be to just change the first line of SQL to read "SELECT membergroupids". |
I tried:
PHP Code:
PHP Code:
Edit: i will try your edited fix now |
I think you'd want
Code:
$sbmemgroups = $sbrow2[TABLE_PREFIX . 'user.membergroupids']; Code:
SELECT membergroupids or I could be wrong. :) |
Invalid SQL:
SELECT vbb_membergroupids FROM vbb_user WHERE vbb_user.userid = 1; MySQL Error : Unknown column 'vbb_membergroupids' in 'field list' This was the error for: PHP Code:
|
Try this:
PHP Code:
|
The above did nothing. No errors either.
--------------- Added [DATE]1306027999[/DATE] at [TIME]1306027999[/TIME] --------------- For reference the following query runs fine: PHP Code:
|
Quote:
|
Could this be the problem:
PHP Code:
PHP Code:
--------------- Added [DATE]1306036694[/DATE] at [TIME]1306036694[/TIME] --------------- I have even tried: Code:
$membergroupids = fetch_membergroupids_array($user, false); but then doing: PHP Code:
however from useradmin_update_save I can do: PHP Code:
PHP Code:
--------------- Added [DATE]1306050752[/DATE] at [TIME]1306050752[/TIME] --------------- I think there may be a way to get the output I want via the fetch_membergroupids_array function but I do not know how to use it. As stated above as long as I can get something that works as the below does but for paidsub_buid I am good: PHP Code:
Ok so here is what I did to test this out: I fed the data directly from txt files so that I could see that the functions run correctly. The program grabs no data externally just runs identical code on the paidsub_build hook and the useradmin_update_save hook. When run from the paidsub_build it never runs completely but useradmin_update_save works. They both use exactly the same code. Example: PHP Code:
|
Is the code you posted the entire plugin? Are you sure the paidsub_build hook is even getting executed? Where are you checking the "returned" value?
The only thing I can think of from what you posted is that the paidsub_build hook is in a function and the other hook isn't, so if you're trying to set a global you probably need to add a "global $sbpaid;" line (or else set an existing global instead). Also, sometimes you can debug by echoing an HTML comment, like Code:
echo "<!-- sbusergroups = $sbusergroups -->\r\n" then view the page source. |
All times are GMT. The time now is 03:04 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|