FreiChat related discussions
Questions about the table created by freichat in database

Hello,

I have to add programatically, some datas in database table created by freichat.

So I tried to understand some of the following database rows:

In the table named "frei_session":

  • Sometime my row "username" is empty. Can someone explain me the reason please ?
  • What is the row "permanent_id" ? I see it's a mktime, with 2 days after "time" row but I don't understand
  • The row "status". I suppose that 1 = connected, 2 = sleeping / in background, 3 = not connected. Am I right ? But what is the 0 please ?
  • The row "in_room": I don't have any room but sometime the value is 1, other time the value is -1 can you explain please ?

In the table named "frei_chat":

  • What is the row "time" ? I think it was mktime format but he doesn't fit (for example the mktime for 13699929150.8136 is 19/02/2404 00:52:30 so it can't be possible)
  • What is the row "GMT Time", same as previously, it seems to be mktime date format, but it isn't (1369985717367 corresponds to 13/02/45383 05:09:27)
  • What is the row "message_type" ?
  • What is the row "room_id" ?

Thank you to all people who take the time to read and answer my questions

Hello, I have to add programatically, some datas in database table created by freichat. So I tried to understand some of the following database rows: In the table named "frei_session": - Sometime my row "username" is empty. Can someone explain me the reason please ? - What is the row "permanent_id" ? I see it's a mktime, with 2 days after "time" row but I don't understand - The row "status". I suppose that 1 = connected, 2 = sleeping / in background, 3 = not connected. Am I right ? But what is the 0 please ? - The row "in_room": I don't have any room but sometime the value is 1, other time the value is -1 can you explain please ? In the table named "frei_chat": - What is the row "time" ? I think it was mktime format but he doesn't fit (for example the mktime for 13699929150.8136 is 19/02/2404 00:52:30 so it can't be possible) - What is the row "GMT Time", same as previously, it seems to be mktime date format, but it isn't (1369985717367 corresponds to 13/02/45383 05:09:27) - What is the row "message_type" ? - What is the row "room_id" ? Thank you to all people who take the time to read and answer my questions

Sometime my row "username" is empty. Can someone explain me the reason please ?

That should not happen , are you getting any errors in your php error log ?

What is the row "permanent_id" ? I see it's a mktime, with 2 days after "time" row but I don't understand

Since freichat supports many different CMS, freichat stores two ids of the user in the table .

  • 'session_id' is the actual userid fetched from the cms
  • 'permanent_id' is a unique id generated by freichat .

The permanent_id never changes even if the user logs in or logs out , is random, and remains same until the end of the session .
Hence the name : permanent_id .

The row "status". I suppose that 1 = connected, 2 = sleeping / in background, 3 = not connected. Am I right ? But what is the 0 please ?

1 = online
2 = invisible
3 = busy

rest all is taken as offline .

The row "in_room": I don't have any room but sometime the value is 1, other time the value is -1 can you explain please ?

-1 means you are not using the chatroom .
If you are using a chatroom , the chatroom id is stored there .


What is the row "time" ? I think it was mktime format but he doesn't fit (for example the mktime for 13699929150.8136 is 19/02/2404 00:52:30 so it can't be possible)

To avoid , same second message conflicts, the messages are stored with microseconds .

What is the row "GMT Time", same as previously, it seems to be mktime date format, but it isn't (1369985717367 corresponds to 13/02/45383 05:09:27)

This time is taken from the client side, The time differs depending on the timezone .

What is the row "message_type" ?

There are many different types of messages like :

  1. private messages
  2. chatroom messages
  3. video requests
  4. AI messages

They each have a different message type .

What is the row "room_id" ?

As said before , it is the chatroom id , if the message is for a particular chatroom .

We did not create a separate table for each of the message type because we were looking for maximum performance .

>Sometime my row "username" is empty. Can someone explain me the reason please ? That should not happen , are you getting any errors in your php error log ? >What is the row "permanent_id" ? I see it's a mktime, with 2 days after "time" row but I don't understand Since freichat supports many different CMS, freichat stores two ids of the user in the table . - 'session_id' is the actual userid fetched from the cms - 'permanent_id' is a unique id generated by freichat . The permanent_id never changes even if the user logs in or logs out , is random, and remains same until the end of the session . Hence the name : permanent_id . >The row "status". I suppose that 1 = connected, 2 = sleeping / in background, 3 = not connected. Am I right ? But what is the 0 please ? 1 = online 2 = invisible 3 = busy rest all is taken as offline . >The row "in_room": I don't have any room but sometime the value is 1, other time the value is -1 can you explain please ? -1 means you are not using the chatroom . If you are using a chatroom , the chatroom id is stored there . --- >What is the row "time" ? I think it was mktime format but he doesn't fit (for example the mktime for 13699929150.8136 is 19/02/2404 00:52:30 so it can't be possible) To avoid , same second message conflicts, the messages are stored with microseconds . >What is the row "GMT Time", same as previously, it seems to be mktime date format, but it isn't (1369985717367 corresponds to 13/02/45383 05:09:27) This time is taken from the client side, The time differs depending on the timezone . >What is the row "message_type" ? There are many different types of messages like : 1. private messages 2. chatroom messages 3. video requests 4. AI messages They each have a different message type . >What is the row "room_id" ? As said before , it is the chatroom id , if the message is for a particular chatroom . We did not create a separate table for each of the message type because we were looking for maximum performance .

Hello,

Thanks a lot for yours answers.

For the row username which is empty I don't have any error in my php log, I just appear as "" instead of the username.

For permanent_id it's an auto_increment property so ?

Can you explain me, the status invisible and busy please ?

For the "in_room" property as I said before I don't have any chatroom, but sometimes in my database the property is set to 1. It's very strange.

I don't understand, what's you explain me with the two "time" property, can you develop please ?

Ok so my message type is always 1 if I don't mistaken, because I don't have any chatroom

For the room_id if there is no room, the values must set with what please ? - 1 ?

Hello, Thanks a lot for yours answers. For the row username which is empty I don't have any error in my php log, I just appear as "" instead of the username. For permanent_id it's an auto_increment property so ? Can you explain me, the status invisible and busy please ? For the "in_room" property as I said before I don't have any chatroom, but sometimes in my database the property is set to 1. It's very strange. I don't understand, what's you explain me with the two "time" property, can you develop please ? Ok so my message type is always 1 if I don't mistaken, because I don't have any chatroom For the room_id if there is no room, the values must set with what please ? - 1 ?

For the row username which is empty I don't have any error in my php log, I just appear as "" instead of the username.

Is the chat working fine ? Are the users in the online list correct ?

For permanent_id it's an auto_increment property so ?

No, it is a randomly generated id .

Can you explain me, the status invisible and busy please ?

No one can see you in their list when you are invisible .
When you are busy, your status icon changes to red.

I don't understand, what's you explain me with the two "time" property, can you develop please ?

It is equivalent to microtime() in PHP times 10 .
In the next version of FreiChat, this time will most probably be converted to simply microtime()

For the room_id if there is no room, the values must set with what please ? - 1 ?

Since, you are not using the chatroom , you do not have to worry about this .
But to answer your question, it must be set to -1

>For the row username which is empty I don't have any error in my php log, I just appear as "" instead of the username. Is the chat working fine ? Are the users in the online list correct ? >For permanent_id it's an auto_increment property so ? No, it is a randomly generated id . >Can you explain me, the status invisible and busy please ? No one can see you in their list when you are invisible . When you are busy, your status icon changes to red. >I don't understand, what's you explain me with the two "time" property, can you develop please ? It is equivalent to microtime() in PHP times 10 . In the next version of FreiChat, this time will most probably be converted to simply microtime() >For the room_id if there is no room, the values must set with what please ? - 1 ? Since, you are not using the chatroom , you do not have to worry about this . But to answer your question, it must be set to -1

Is the chat working fine ? Are the users in the online list correct ?

The chat is working fine yeah. I don't show online users lists. I use freichat as a private message system. I check if the user is online or not, and if he's online I can send him a message

No, it is a randomly generated id

So what value I have to assign to this row in my webservice ?

No one can see you in their list when you are invisible .
When you are busy, your status icon changes to red.

Ok thanks

It is equivalent to microtime() in PHP times 10 .
In the next version of FreiChat, this time will most probably be converted to simply microtime()

Ok i see the php function microtime(), but I don't understand when you say "PHP times 10". What do you mean please ?

Since, you are not using the chatroom , you do not have to worry about this .
But to answer your question, it must be set to -1

I have to set the value in my webservice, so I have to care about that ;)

>Is the chat working fine ? Are the users in the online list correct ? The chat is working fine yeah. I don't show online users lists. I use freichat as a private message system. I check if the user is online or not, and if he's online I can send him a message >No, it is a randomly generated id So what value I have to assign to this row in my webservice ? >No one can see you in their list when you are invisible . >When you are busy, your status icon changes to red. Ok thanks >It is equivalent to microtime() in PHP times 10 . >In the next version of FreiChat, this time will most probably be converted to simply microtime() Ok i see the php function microtime(), but I don't understand when you say "PHP times 10". What do you mean please ? >Since, you are not using the chatroom , you do not have to worry about this . >But to answer your question, it must be set to -1 I have to set the value in my webservice, so I have to care about that ;)

So what value I have to assign to this row in my webservice ?

Let us know what you are trying to make , we will be able to help you better .

Ok i see the php function microtime(), but I don't understand when you say "PHP times 10". What do you mean please ?

The time is calculated like this:

time() . str_replace(" ", "", microtime());

It is needlessly complicated , so we will be converting this to simple microtime() in our next release .

>So what value I have to assign to this row in my webservice ? Let us know what you are trying to make , we will be able to help you better . >Ok i see the php function microtime(), but I don't understand when you say "PHP times 10". What do you mean please ? The time is calculated like this: ``` time() . str_replace(" ", "", microtime()); ``` It is needlessly complicated , so we will be converting this to simple microtime() in our next release .

Let us know what you are trying to make , we will be able to help you better .

I have to develop a webservice. In this webservice I will make a INSERT INTO table VALUES ('value 1', 'value 2', ...). So I have to know which value I have to put in each row, so I answer theses questions.

The time is calculated like this:

time() . str_replace(" ", "", microtime());

It is needlessly complicated , so we will be converting this to simple microtime() in our next release .

Ok thanks you I understand better like this.

Thanks a lot

>Let us know what you are trying to make , we will be able to help you better . I have to develop a webservice. In this webservice I will make a INSERT INTO table VALUES ('value 1', 'value 2', ...). So I have to know which value I have to put in each row, so I answer theses questions. >The time is calculated like this: >``` >time() . str_replace(" ", "", microtime()); >``` >It is needlessly complicated , so we will be converting this to simple microtime() in our next release . Ok thanks you I understand better like this. Thanks a lot
240
6
0
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft