Sponsored Content
Top Forums Web Development Notes with Ravinder on Badging System Development Part II Post 303028187 by Neo on Tuesday 1st of January 2019 12:14:30 PM
Old 01-01-2019
OK, I see the problem... your table name should be user and not users:

Code:
mysql> SELECT TIME_TO_SEC(TIMEDIFF(NOW(), FROM_UNIXTIME('jointime')))/(3600*24) AS 'join_time' FROM user WHERE userid =1;
+-----------+
| join_time |
+-----------+
|   34.9583 |
+-----------+
1 row in set, 2 warnings (0.00 sec)

 

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

New Badging System - Badges Prototype Beta 1 (Badges Only)

Today I mapped out the new badging system using FA icons, Beta 1 in no particular order except a 6 x 8 grid: https://www.unix.com/members/1-albums215-picture991.png The prototype HTML code for this layout: <style> .fa-badge-grid { font-size: 1.5em; } .row { ... (38 Replies)
Discussion started by: Neo
38 Replies

2. What is on Your Mind?

Status of Badging System - Beta 1

Dear All, Here is the current status of the badging system: The Beta 1 phase of the new badging system is close to completion. 42 prototype badges have been "allocated" 6 prototype badge slots are held in reserve The "alert you have new badges" prototype is running and is currently... (4 Replies)
Discussion started by: Neo
4 Replies

3. What is on Your Mind?

Badging System: UNIX.COM Bug Hunter Badge (New)

I have moved the bug badge out of reserve and into the main stream. Basically, I will assign a color level like the others, based on who has made a good actionable bug report for UNIX.COM. "Good" means screenshots, links, and even details from web dev tools our the HTML source code. So far,... (0 Replies)
Discussion started by: Neo
0 Replies
PG_FREE_RESULT(3)														 PG_FREE_RESULT(3)

pg_free_result - Free result memory

SYNOPSIS
bool pg_free_result (resource $result) DESCRIPTION
pg_free_result(3) frees the memory and data associated with the specified PostgreSQL query result resource. This function need only be called if memory consumption during script execution is a problem. Otherwise, all result memory will be auto- matically freed when the script ends. Note This function used to be called pg_freeresult(3). PARAMETERS
o $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others). RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 pg_free_result(3) example <?php $db = pg_connect("dbname=users user=me") || die(); $res = pg_query($db, "SELECT 1 UNION ALL SELECT 2"); $val = pg_fetch_result($res, 1, 0); echo "First field in the second row is: ", $val, " "; pg_free_result($res); ?> The above example will output: First field in the second row is: 2 SEE ALSO
pg_query(3), pg_query_params(3), pg_execute(3). PHP Documentation Group PG_FREE_RESULT(3)
All times are GMT -4. The time now is 06:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy