is there a way to check what is the most right column in mys

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

is there a way to check what is the most right column in mys

Post by pelegk2 »

is there a way to check what is the most right column in mysql? what its name?
User avatar
aquila125
Forum Commoner
Posts: 96
Joined: Tue Dec 09, 2003 10:39 am
Location: Belgium

Post by aquila125 »

Why do you need that?

It's not good practice to build your script around the place of a certain column.. if you ever want to add an extra column you'll need to change the entire script...
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

nope!
beacuse i every month add a new colimn on the right!
and beacuse of that i need to know what is the most right column!

by the way : is there a col limit?
Hurklefish
Forum Newbie
Posts: 7
Joined: Sat Dec 20, 2003 4:03 pm

Post by Hurklefish »

I am very intrigued by your database schema.. could you post a little bit about the how and why of a monthly column addition? we might be able to set you up with something much better.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

i want every new month to add dynamiclly
a col on the right
for example next month i want to add :
01_2004
which its meanning is obvious
and the user can update that month data for each row
hedge
Forum Contributor
Posts: 234
Joined: Fri Aug 30, 2002 10:19 am
Location: Calgary, AB, Canada

Post by hedge »

sounds like you have a serious design issue with your DB. New data should be in Rows, once your table structure is defined it should be static, unless funcionality is changed.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

couldnt you just call on the current month using date()??
Post Reply