Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:comet:cometql [2017/04/18 04:14] levhav [How to connect and try by yourself] |
en:comet:cometql [2019/12/18 02:05] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <rst>EN::002-API::002-CometQL::004-CometQL API</rst> | ||
+ | <rst>Header: CometQL API</rst> | ||
+ | |||
====== CometQL ====== | ====== CometQL ====== | ||
Line 39: | Line 42: | ||
<note tip>[[en:comet:cometql:cli|Here you can test source code based on PHP with CometQL]] using for online command prompt implementation.</note> | <note tip>[[en:comet:cometql:cli|Here you can test source code based on PHP with CometQL]] using for online command prompt implementation.</note> | ||
- | + | ||
- | <note important>Also are cases when you can’t use MySQL protocol to connecting comet server. For these cases you can send commands to comet server by HTTP/HTTPS. Read the article [[en:comet:cometql:HTTP|sending CometQL queries by HTTP]].</note> | + | |
- | + | ||
An example of connecting to a comet server from php. | An example of connecting to a comet server from php. | ||
<code php> | <code php> | ||
Line 116: | Line 116: | ||
Input channel name “pipe _name” and click “subscribe”. | Input channel name “pipe _name” and click “subscribe”. | ||
<html> | <html> | ||
- | <iframe src="//comet-server.ru/doc/example/7/subscriptionTest.php" width="910px"></iframe> | + | <iframe src="//comet-server.com/doc/example/7/subscriptionTest.php" width="910px"></iframe> |
</html> | </html> | ||
Now perform with online command prompt insert-query with pipes_messages and check the result. | Now perform with online command prompt insert-query with pipes_messages and check the result. | ||
Line 143: | Line 143: | ||
Input channel name “web_admins” and click “subscribe”. | Input channel name “web_admins” and click “subscribe”. | ||
<html> | <html> | ||
- | <iframe src="//comet-server.ru/doc/example/7/subscriptionTest.php" width="910px"></iframe> | + | <iframe src="//comet-server.com/doc/example/7/subscriptionTest.php" width="910px"></iframe> |
</html> | </html> | ||
Now perform query again and you will see that amount of subscribers are increase. | Now perform query again and you will see that amount of subscribers are increase. | ||
Line 224: | Line 224: | ||
===== Table users_time ===== | ===== Table users_time ===== | ||
- | The table users_time contains data about users were online. This table is available only for reading. Data timing stores in UNIX-time. | + | The table users_time contains data about when users were online. This table is available only for reading. Data timing stores in UNIX-time. |
<code sql> | <code sql> | ||
mysql> select * from users_time where id in( 2, 3, 145); | mysql> select * from users_time where id in( 2, 3, 145); | ||
Line 265: | Line 265: | ||
===== Other information ===== | ===== Other information ===== | ||
- | * [[en:comet:cometql:cli|Example of using CometQL based on PHP;]] | ||
* [[en:comet:cometql-bash-example|Example of sending messages from bash.]] | * [[en:comet:cometql-bash-example|Example of sending messages from bash.]] | ||
* [[en:comet:cometql:error|Error code in CometQL]] | * [[en:comet:cometql:error|Error code in CometQL]] | ||
* [[en:comet:javascript_api:pipe-types|Reserved channel names]] | * [[en:comet:javascript_api:pipe-types|Reserved channel names]] | ||
* [[en:comet:javascript_api|JavaScript API]] | * [[en:comet:javascript_api|JavaScript API]] | ||
- | * [[en:comet:testhosting|Why the script runs on the local machine and does not work on hosting?]] | ||
* [[en:comet:dev_id|What it is and why do we need "A public developer token" and "Secret developer key?"]] | * [[en:comet:dev_id|What it is and why do we need "A public developer token" and "Secret developer key?"]] | ||
- | * [[en:comet:faq:send-message-to-pipe|How to send a message to an arbitrary channel and how to then get on another page?]] | ||
- | * [[en:comet:faq:realtime-users-list|How to implement a mechanism for tracking users entering the site. That is a list of visitors updated on the "fly"?]] | ||
====== Reserved channels names ====== | ====== Reserved channels names ====== |