Sponsored Content
The Lounge What is on Your Mind? Search for REALLY old threads / posts Post 303029036 by Neo on Saturday 19th of January 2019 11:48:44 PM
Old 01-20-2019
Hey Rudi,

Here is the current draft PHP query for this.

Seems to fit the bill what you asked for.

Code:
<?php
if ($vbulletin->GPC['searchbyyear'] >= 2000 and $vbulletin->GPC['searchbyyear'] <= $date('Y')) {
    $max_results = 3000;
    $start_year_unixtime = $mktime(0, 0, 0, 1, 1, $vbulletin->GPC['searchbyyear']);
    $end_year_unixtime = $mktime(23, 59, 59, 12, 31, $vbulletin->GPC['searchbyyear']);
    $nl_query_limit = 'LIMIT ' .   $max_results;
    $thread_query_logic[] = "post.dateline >= " . $start_year_unixtime . " thread.dateline <= " . $end_year_unixtime;
}

This User Gave Thanks to Neo For This Post:
 

We Also Found This Discussion For You

1. Post Here to Contact Site Administrators and Moderators

How do i delete threads/posts?

I cannot find the option anywhere when i click on "Edit". (2 Replies)
Discussion started by: johnthebaptist
2 Replies
MSSQL_FIELD_LENGTH(3)													     MSSQL_FIELD_LENGTH(3)

mssql_field_length - Get the length of a field

SYNOPSIS
int mssql_field_length (resource $result, [int $offset = -1]) DESCRIPTION
Returns the length of field no. $offset in $result. PARAMETERS
o $result - The result resource that is being evaluated. This result comes from a call to mssql_query(3). o $offset - The field offset, starts at 0. If omitted, the current field is used. RETURN VALUES
The length of the specified field index on success or FALSE on failure. EXAMPLES
Example #1 mssql_field_length(3) example <?php // Connect to MSSQL and select the database mssql_connect('MANGOSQLEXPRESS', 'sa', 'phpfi'); mssql_select_db('php'); // Send a select query to MSSQL $query = mssql_query('SELECT [name], [age] FROM [php].[dbo].[persons]'); // Print the field length echo 'The field 'age' has a data length of ' . mssql_field_length($query, 1); // Free the query result mssql_free_result($query); ?> The above example will output something similar to: The field 'age' has a data length of 4 NOTES
Note Note to Windows Users Due to a limitation in the underlying API used by PHP (MS DBLib C API), the length of VARCHAR fields is limited to 255. If you need to store more data, use a TEXT field instead. SEE ALSO
mssql_field_name(3), mssql_field_type(3). PHP Documentation Group MSSQL_FIELD_LENGTH(3)
All times are GMT -4. The time now is 02:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy