vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help with this small script (MYSQL) (Help running a query) (https://vborg.vbsupport.ru/showthread.php?t=73765)

rake 01-04-2005 08:30 PM

$a = myql_affected_rows();

place it right after the mysql_query call you need to check. (right after your update query).

$a will then contain the number of affected rows, 1 in your case, if the query ran.

Slybone 01-04-2005 08:35 PM

the problem with that is it wont echo the output will it?

rake 01-04-2005 08:50 PM

add an:
echo $a; exit; :)

Marco van Herwaarden 01-04-2005 08:53 PM

Then do a: 'echo "$a";' after that.

But i still don't get your script, does it give you any SQL errors?
- I think you inserted the update statement inside an existing code block, and have commented the last part of the script out.
- Why don't you use the standard vB functions for validating login, and accessing database?
- Script should produce an error anyway because 'if(!$res[c]) ' would be true (you don't run the select count query anymore) and the script would try to insert a new user with that id.
- Did you run the manual select query before and after running the script?

Slybone 01-04-2005 08:55 PM

the thing is that the script isnt accessed when you access another page, that states the forum rules, the script runs in the background, so even if it did echo I wouldnt see it, It seems to work fine when creating the accounts and what not, I just cant make it set options to 87


All times are GMT. The time now is 03:44 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.02535 seconds
  • Memory Usage 1,711KB
  • 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
  • (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
  • (5)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