We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16899
    • 284 Posts
    Hi Guys

    I´ve got a question... i have a situation where i have custom php code inside of a snippet. How can i pass the output of this custom php code to a TV? The TV value should always be the output of my custom php code even when the output it´s updated!!!
    Is this possible?

    My php code:
    <?php
    $description = mysql_query
    ("
    	SELECT  `rates_packages`.`description`
    	FROM  `rates_packages` 
    	WHERE  `rates_packages`.`id` = 1
    	AND  `rates_packages`.`published` =1
    	AND  `rates_packages`.`deleted` !=1
    ");
    
    $d = mysql_fetch_array($description);
    
    echo $d['description'];
    


    Many thanks in advance
      • 4172
      • 5,888 Posts
      I don't understand, what's the reason to have a TV, which does allways show the same content.
      Can't you just put the snippet-tag into the template?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 16899
        • 284 Posts
        Quote from: Bruno17 at Jan 13, 2014, 07:58 AM
        I don't understand, what's the reason to have a TV, which does allways show the same content.
        Can't you just put the snippet-tag into the template?

        Because i need a TV value to push the php code output with the getresources. I tried to put the snippet inside my TV, it show on the page, but it´s not pushed by getresources!!!!
          • 16899
          • 284 Posts
          Quote from: Bruno17 at Jan 13, 2014, 07:58 AM
          I don't understand, what's the reason to have a TV, which does allways show the same content.
          Can't you just put the snippet-tag into the template?

          The reason is that i have more that one snippet that i want to use in the TV, according the Resource. But then when i want to retrieve the value with getresources or Advsearch from my TV, it won´t show me any data, but in the resource it does... why?

          Check the attached picture, please!!!!

          Many thanks to try to help me!!! smiley