vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Get back a value from a field .... (https://vborg.vbsupport.ru/showthread.php?t=46060)

grog6 11-24-2002 09:26 AM

Get back a value from a field ....
 
Hi, I don't know if my title is very understandable .... sorry :hurt:

I've a problem with a new hack I'm finishing ....

So, I'd like to get back a value from a field and compare it to something

I've in my table thread a fiel called adresse_icone and I'd like to get back this value for a special thread and compare it to an other value .... hum :alien: , I don't think I'm understandble

That's what I'd like to do :

PHP Code:

$threadadr=$DB_site->query_first("SELECT adresse_icone FROM thread WHERE threadid='$threadid'"); 

if ((
$threadadr)!=('')) 

$img="<img src="
$alt="alt="
$fin=">"


in the global.php file to get back $img, $alt and $fin in the template forumdisplay_threadbit

If the field is empty, I don't want to do it

The query doesn't seem to be good ... Help me plizzzzzz ;)

Xenon 11-24-2002 01:25 PM

use this instead:

PHP Code:

$threadadr=$DB_site->query_first("SELECT adresse_icone FROM thread WHERE threadid='$threadid'"); 

if (
trim($threadadr['adresse_icone'])!=''

$img="<img src="
$alt="alt="
$fin=">"




All times are GMT. The time now is 05:37 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.01038 seconds
  • Memory Usage 1,713KB
  • 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)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete