File/plugins/ObjectManager/sql.inc.php

Description

SQL query library for ObjectManager plugin.

Functions
sql_count_stocks (line 23)

Count stocks match by pattern $s.

string sql_count_stocks (string $pattern)
  • string $pattern
sql_count_stock_position_reference (line 115)

Count references made to a stock record.

  • todo: function is not necessary if mySQL would check keys properly this can be one query in mySQL >4.0
  • stockmaniac-tables: position
  • access: public
string sql_count_stock_position_reference (int $id_stock)
  • int $id_stock
sql_delete_split (line 311)

Delete a stock split record by id.

  • stockmaniac-tables: split
  • access: public
string sql_delete_split (int $id_split)
  • int $id_split
sql_delete_stock (line 99)

Delete stock record by id.

  • stockmaniac-tables: stock
  • access: public
string sql_delete_stock (int $id_stock)
  • int $id_stock
sql_search_symbolextension (line 203)

Select symbol extensions by pattern

Limit output to a specific "slice" defined with $start_line and $length

  • stockmaniac-tables: stock_symbolextension
  • access: public
string sql_search_symbolextension ([string $pattern = ''], [int $start_line = 0], [int $length = 20])
  • string $pattern
  • int $start_line
  • int $length
sql_select_newsfeeds (line 262)

Select all news feeds in the system.

  • stockmaniac-tables: news_feed;
  • access: public
string sql_select_newsfeeds ()
sql_select_quotesource (line 134)

Select list of all quote sources or single quote source by id

  • stockmaniac-tables: stock_quotesource
  • access: public
string sql_select_quotesource ([int $id_stock_quotesource = false])
  • int $id_stock_quotesource
sql_select_stock (line 86)

Select security by id.

  • stockmaniac-tables: stock
  • access: public
string sql_select_stock (int $id_stock)
  • int $id_stock
sql_select_stocklist (line 49)

Select list of securities by pattern.

  • see: sql_count_stocks()
  • stockmaniac-tables: stock, stock_symbolextension, stock_quotesource
  • access: public
string sql_select_stocklist (string $pattern, [ $start_line = 0], [int $length = 20], int $patterntart_line)
  • string $pattern
  • int $patterntart_line
  • int $length
  • $start_line
sql_select_symbolextension (line 166)

Select list of all symbol extensions, or single extension by ID

Optionally result can be formatted as list with full name and extension. The result set contains two columns which is useful along with DBC::sql_get_indexedlist_result()

  • see: DBC::sql_get_indexedlist_result()
  • stockmaniac-tables: stock_symbolextension
  • access: public
string sql_select_symbolextension ([int $id_stock_symbolextension = false], [bool $formatted = false])
  • int $id_stock_symbolextension
  • bool $formatted
sql_store_symbol_extension (line 228)

Store symbol extension in database.

  • deprecated: use vo_*->store() to insert/update records
  • stockmaniac-tables: stock_symbolextension
  • access: public
string sql_store_symbol_extension (array $se)
  • array $se
sql_update_fetchflag (line 292)

Toggle fetch flag (enable/disable news item retrieval) for newsfeed.

  • stockmaniac-tables: news_feed
  • access: public
string sql_update_fetchflag (int $id_news_feed, [bool $fetch = true])
  • int $id_news_feed
  • bool $fetch

Documentation generated on Sun, 22 Aug 2010 11:20:25 +0200 by phpDocumentor 1.4.3