Jump to content
×
×
  • Create New...
  • 0

PHP - Function SELECT create_time FROM db


ReFresh

Question

Hi guys,

I have problem with select column from database. I need to add to web a function which show create_time of account in user panel. I tried this but it didn't work:

$selectTime = "SELECT create_time FROM account.account WHERE id=2";

I got this error: mysql table is empty

Can someone help me with that?

Thanks for answers!

Regards,

ReFresh

Link to comment

7 answers to this question

Recommended Posts

  • 0
3 minutes ago, metin2team said:

rather than adding a new query you should add create_time to the login query
 with that you'll get the create_time without have to add a new query.

 

Can you show me an example?

Link to comment
  • 0
35 minutes ago, metin2team said:

you should add your login query or the login.php file.

showing an example won't help if you don't have any good background in PHP.

$mysql->query("SELECT id, login, email, create_time FROM account.account WHERE id='x'");

 

I tried this, but it still says: query was empty

$sqlSelect = "SELECT id, login, email, create_time FROM account.account WHERE id='".$_SESSION['user_id']."'";

$account = mysql_query($sqlSelect);

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Read our Rules
  • Activity

    1. 2

      Fix CursorImage 'NoneType' object is not callable.

    2. 0

      [Land of Heroes] We are looking for Game / Game Economy Designers

    3. 177

      Render Target Remastered

    4. 1

      MySQL stop when start server

    5. 0

    6. 59

      Emoji in TextLine

  • Recently Browsing

    No registered users viewing this page.

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.