Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Static row number
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Static row number
#29115
Static row number 11 Years, 10 Months ago Karma: 0
Hi,
Sorry for poor English.
How can i add column with static row number.
I want to put static row count (ordinal number) in one column.
In the remaining columns will be data from the SQL database.


Thanks in advance
The administrator has disabled public write access.
 
#29162
Re:Static row number 11 Years, 10 Months ago Karma: 748
Hello,

You can use user-defined variables. A sample SQL query:

Code:


SELECT 
  @rownum:=@rownum+1 AS position,
  id,
  title 
FROM 
  (SELECT @rownum:=0) AS pos,
  #__content



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1