vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Problem with passing query results to a function (https://vborg.vbsupport.ru/showthread.php?t=183399)

Marco van Herwaarden 06-27-2008 08:32 AM

All that would be needed is changing:
PHP Code:

function check_fields($my_values//this is my custom function with my array as a pass parameter.  The name does not need to be the same but I'm leaving it the same for sake of simplicity 

to:
PHP Code:

function check_fields(&$my_values//this is my custom function with my array as a pass parameter.  The name does not need to be the same but I'm leaving it the same for sake of simplicity 

More info:
References Explained - Manual
Passing by Reference - Manual

AsscBB 06-27-2008 10:05 PM

I had tried that and it still wasn't working as expected. If I restructure it to not call a function and just do it in my main, it seems to work, so I'll probably just do it that way. I'll probably come back to it to see if I can get it to work by passing it later, but I'd rather work throught the rest of my logic right now... That can always be compartmented later!

Thanks again for the help! Hopefully I'll get it working right!


All times are GMT. The time now is 01:56 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01779 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete