Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2012-03-07 20:14:09

THS
Member
Registered: 2012-02-02
Posts: 313
Website

PHP Help

Sorry to ask this here.  PHP is not my primary language (Flex,AS,CF), so I have hit a bit of a stumbling block.  I have it narrowed down to the query row.  I know the query works, but the count of $videos is returning 0 so I don't get output.  I am unsure of how to fully execute this query using the ASP framework.

If someone could be so kind as to point my error, I would appreciate it.

In the module code:

    public function render()
    {
      $db = VF::factory('database');
      $tpl = VF::factory('template');
      $videos = $db->get_rows("SELECT title FROM #__video LIMIT 2");
      $tpl->videos = $videos;
      $tpl->menu = 'main';
      $tpl->submenu = 'tool';
      $tpl->meta_title = 'Admin::Tools::Hello World';
      $tpl->load(array('header', 'helloworld', 'footer'));
      $tpl->display();
    }

Last edited by THS (2012-03-07 20:56:12)

Offline

#2 2012-03-08 07:19:51

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: PHP Help

What does:

echo VF::debug($tpl->videos)

reurn?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2012-03-08 07:33:08

THS
Member
Registered: 2012-02-02
Posts: 313
Website

Re: PHP Help

It returns (NULL).  I ran the exact query in phpMyAdmin and it returns results, so I guess I am not initializing something correctly.

Last edited by THS (2012-03-08 08:08:59)

Offline

#4 2012-03-08 09:25:37

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: PHP Help

The code seems correct. Sincerly i dont know what the problem is sad


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#5 2012-03-08 18:35:07

THS
Member
Registered: 2012-02-02
Posts: 313
Website

Re: PHP Help

I sent an email with the files.  I am sure I have just made a simple error.  Once I get it figured out, I promise to not bother you! smile

Offline

#6 2012-03-09 07:02:56

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: PHP Help

Will check my email asap.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2012-03-10 05:23:58

THS
Member
Registered: 2012-02-02
Posts: 313
Website

Re: PHP Help

Thanks!  Did you get the files?

Offline

Board footer

Powered by FluxBB