Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2004-07-29 14:57:38

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_request_count: Article Request Counter

I fixed the link! Sorry.

Offline

#12 2004-07-30 07:32:00

pospel
Member
From: Ukraine
Registered: 2004-02-23
Posts: 40
Website

Re: rsx_request_count: Article Request Counter

Great thanks ramanan. When i use your plugin i receive such:

Warning: Missing argument 2 for rsx_request_count() in /home/emocom/public_html/blog/textpattern/publish.php(764) : eval()’d code on line 3

Any ideas?

Offline

#13 2004-07-30 19:34:20

Tom Alday
Member
Registered: 2004-04-27
Posts: 38
Website

Re: rsx_request_count: Article Request Counter

When i try to add the table in SQL i get this error:

Error

SQL-query :

ALTER TABLE ‘textpattern’ ADD ‘request_count’INT DEFAULT ‘0’ NOT NULL

MySQL said:
  1. - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘textpattern’ ADD ‘request_count’INT DEFAULT ‘0’ NOT NULL’ a

It’s possible i’m simply doing it wrong since SQL is not my strong point

Offline

#14 2004-07-31 07:23:42

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_request_count: Article Request Counter

Tom, make sure you don’t use the curly quotes in your SQL statement. that may cause problems. I am not sure what else would be a problem in your query.

Pospel, how are you using the tag? There should be no second argument to the tag.

Offline

#15 2005-01-23 19:20:13

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,296
Website

Re: rsx_request_count: Article Request Counter

phpMyAdmin returns the same error

  1. - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘‘textpattern’ ADD ‘request_count’ INT DEFAULT ‘0’ NOT NULL’ at line 1

Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#16 2005-01-24 05:24:55

paularms
Member
From: University of Minnesota
Registered: 2004-10-21
Posts: 155
Website

Re: rsx_request_count: Article Request Counter

Ramanan: I see that you have a page displaying your most viewed articles and giving the number of views. Is this another plugin that you plan to release or do I really need to learn PHP?

and colak, there is a graphical way to add that in phpMyAdmin instead of just entering in the SQL. click on the txp_textpattern table and at the bottom, right after “Print view” and “Propose table structure”, click the GO button and you can add the stuff manually.

Last edited by paularms (2005-01-24 05:26:42)

Offline

#17 2005-01-24 10:30:47

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,296
Website

Re: rsx_request_count: Article Request Counter

Ramanan, thanks for the response. I am new with mysql and phpmyadmin. Can you please be more specific. On adding a new field I am presented with
Field
Type
Length/Values*
Collation
Attributes
Null
Default**
Extra

4 radio buttons and a checkbox

Am I correct in assuming that the fields should be filled like this
Field: request_count
Type: INT
Length/Values*
Collation
Attributes
Null: not nul
Default** : 0
Extra

the 3rd radi button selected
and the checkbox uncheckked

Your advise would be appreciated…

Last edited by colak (2005-01-24 10:31:10)


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#18 2005-01-24 12:59:09

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: rsx_request_count: Article Request Counter

Field: request_count
Type: INT
Attribute : Unsigned (not needed really)
Null: Not Null
Default: 0
Extra:

Primary:
Index:
Unique:
- : <— select this radio button

fulltext:

That should be correct. You don’t need to check the unique radio button, because there is only one row in this table.

Offline

#19 2005-01-25 07:33:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,296
Website

Re: rsx_request_count: Article Request Counter

Thank you ramanan. Done it and it doesn’t work… will have to experiment a bit more.


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

#20 2005-01-29 09:57:54

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,296
Website

Re: rsx_request_count: Article Request Counter

It somehow started working now. thanx again!


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | NeMe @ github | Covid-19; a resource
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB