Sponsored Content
The Lounge What is on Your Mind? New Member and Country Computer Trivia Leaderboards Post 303041007 by Neo on Tuesday 12th of November 2019 06:52:50 AM
Old 11-12-2019
Update:

Fixed a minor bug in the Minor League Member Leaderboard, caused by sorting on strings instead of floats, which caused users with scores of '100%' to not appear in the sort results.

This bug only appeared in queries where there were no incorrect answers to trivia questions, and this was only the case with people with a very few answers.

Also,

Added a PHP array of country codes to country name so now the country names appear in the leaderboards instead of the country codes.
 

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

xterm trivia

Thanks Livin Free... Here's another one... Why is it that I always get the error message "Error: Can't open display:" in my mail whenever I execute or try to call an xterm command using cron to activate the command. What did I miss? Thanks in advance UNIX gurus... (3 Replies)
Discussion started by: jfsuminist
3 Replies

2. What is on Your Mind?

Forum Trivial Pursuit - New Computer Science and Mathematics Trivia for UNIX.com

I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box. In the future, I plan to Expand this feature to add more trivia categories from math, science and technology. Keep track of correct and... (20 Replies)
Discussion started by: Neo
20 Replies

3. What is on Your Mind?

1000+ Computer Science Trivia Questions at UNIX.COM

The UNIX and Linux Forums now has over 1000 TRUE / FALSE computer science and computer related trivia question in our database. These questions are of relatively high quality (compared to similar sites on the web) and are fun (according to feedback by users). In the first week during the... (1 Reply)
Discussion started by: Neo
1 Replies

4. What is on Your Mind?

Debugging Our Computer Science Trivia Feature

Only a few days after I coded this new feature from scratch, we are seeing over 3000 entries in the database from members (mostly guests) playing CS trivia. I have spend a lot of time coding this (from scratch) and testing the API. From the logs, it seems to have an API bug which appears... (31 Replies)
Discussion started by: Neo
31 Replies

5. What is on Your Mind?

Computer Trivia Feature Tops 50,000 Questions Answered

Just noticed that our successful computer trivia feature (stats here) has surpassed over 50,000 questions answered by users: https://www.unix.com/trivia_stats.php This was a coding effort worth while and I'm pleased to see so many people enjoying it in such a short time since it was released... (3 Replies)
Discussion started by: Neo
3 Replies
MYSQL_FIELD_TABLE(3)							 1						      MYSQL_FIELD_TABLE(3)

mysql_field_table - Get name of the table the specified field is in

SYNOPSIS
Warning This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should be used. See also MySQL: choosing an API guide and related FAQ for more information. Alternatives to this function include: omysqli_fetch_field_direct(3) [table] or [orgtable] o PDOStatement::getColumnMeta [table] string mysql_field_table (resource $result, int $field_offset) DESCRIPTION
Returns the name of the table that the specified field is in. o $ result -The result resource that is being evaluated. This result comes from a call to mysql_query(3). o $ field_offset -The numerical field offset. The $field_offset starts at 0. If $field_offset does not exist, an error of level E_WARNING is also issued. The name of the table on success. Example #1 A mysql_field_table(3) example <?php $query = "SELECT account.*, country.* FROM account, country WHERE country.name = 'Portugal' AND account.country_id = country.id"; // get the result from the DB $result = mysql_query($query); // Lists the table name and then the field name for ($i = 0; $i < mysql_num_fields($result); ++$i) { $table = mysql_field_table($result, $i); $field = mysql_field_name($result, $i); echo "$table: $field "; } ?> Note For backward compatibility, the following deprecated alias may be used: mysql_fieldtable(3) mysql_list_tables(3). PHP Documentation Group MYSQL_FIELD_TABLE(3)
All times are GMT -4. The time now is 12:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy