Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Здравствуйте....

у меня проблема с одним таском...

я пытаюсь вытащить с 3х таиблов результаты а потом их умножыть и прибавить друг другу...

но у меня проблема с sql-ом, никак не смог исправить...

так помогите люди добрые поделитесь знанием...

вот скрип



<?php


if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}

/**
*
* @class task_item
* @brief Task to update the profile views from the temporary table
*
*/
class task_item
{
/**
* Object that stores the parent task manager class
*
* @var $class
*/
protected $class;

/**
* Array that stores the task data
*
* @var $task
*/
protected $task = array();

/**
* Registry Object Shortcuts
*
* @var $registry
* @var $DB
* @var $lang
*/
protected $registry;
protected $DB;
protected $lang;

/**
* Constructor
*
* @param object $registry Registry object
* @param object $class Task manager class object
* @param array $task Array with the task data
* @return @e void
*/
public function __construct( ipsRegistry $registry, $class, $task )
{
/* Make registry objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->lang = $this->registry->getClass('class_localization');

$this->class = $class;
$this->task = $task;
}

/**
* Run this task
*
* @return @e void
*/
public function runTask()
{
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_global' ), 'core' );

/*
$this->DB->build( array( 'select' => 'posts, COUNT(*) as posts', 'eco_points, COUNT(*) as eco_points',
'from' => 'members', 'pfields_content',
'group' => 'member_id'
) );
*/
// And finally, a complex build query showing all available parameters
$this->DB->build( array(
'select' => 't.*',
'from' => array( 'members' => 't' ),
'group' => 't.member_id',
'add_join' => array(
array(
'select' => 'm.*',
'from' => array( 'pfields_content' => 'm' ),
'where' => 'm.member_id=t.member_id',
'type' => 'left',
),
array(
'select' => 'o.*',
'from' => array( 'profile_portal' => 'o' ),
'where' => 'o.pp_member_id=m.member_id',
'type' => 'left',
),
)

) );








//$z =
$this->DB->execute();
//while( $this->DB->fetch( $z ) )
// {


$sanoma = $o['time_spent'] + 80 * $m['eco_points'] / 4 + $t['posts'] * 100;


//----------------------------------------
// Update...
//-----------------------------------------

$this->DB->update( 'pfields_content', "bounty=" .$sanoma, "member_id=" .$t['member_id'], FALSE, TRUE );
// $this->DB->update( 'pfields_content', 'bounty='. $sanoma, 'member_id=1', true, true );

// }
//-----------------------------------------
// Delete from table
//-----------------------------------------

//$this->DB->delete( 'bounty' );

//-----------------------------------------
// Log to log table - modify but dont delete
//-----------------------------------------

$this->class->appendTaskLog( $this->task, $this->lang->words['task_bounty'] );

//-----------------------------------------
// Unlock Task: DO NOT MODIFY!
//-----------------------------------------

$this->class->unlockTask( $this->task );
}
}

спасибо заранее...

  • Author

он не работает после включения нечего не вводит в базу данных....

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.