Function __global->cns_get_topic_where

Definitions

sources/cns_topics.php

  • Get an SQL 'WHERE' clause for the posts in a topic.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$topic_id AUTO_LINK No No required parameter N/A N/A The ID of the topic we are getting details of
$member_id ?MEMBER No No Null N/A N/A The member doing the lookup (null: current member)

Returns

  • The WHERE clause
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get an SQL 'WHERE' clause for the posts in a topic.
 *
 * @param  AUTO_LINK $topic_id The ID of the topic we are getting details of
 * @param  ?MEMBER $member_id The member doing the lookup (null: current member)
 * @return string The WHERE clause
 */

function cns_get_topic_where(int $topic_id, ?int $member_id = null) : string