473,326 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Auto creaton of filed in a table

Hi All,

This is Pavankumar, I am doing Attendance Management project in PHP.
What i want is as a day increases i want to alter the table with new filed with name current date(i,e) 01 Nov 07 for today, for tomarrow new filed with name 02 Nov 07 needs to be created. And each and every time it has to check for the particular column, if the column is not existing it has to create otherwise remain as it is.

Pl suggest me how to write the code.

Thank you.

Regards,
P Pavankumar
Nov 1 '07 #1
2 1244
nathj
938 Expert 512MB
Hi All,

This is Pavankumar, I am doing Attendance Management project in PHP.
What i want is as a day increases i want to alter the table with new filed with name current date(i,e) 01 Nov 07 for today, for tomarrow new filed with name 02 Nov 07 needs to be created. And each and every time it has to check for the particular column, if the column is not existing it has to create otherwise remain as it is.

Pl suggest me how to write the code.

Thank you.

Regards,
P Pavankumar
Hi,

I think that each day you need to issue an alter table command each day. I would, at each login, check the current date against the latest date in a second table. Then if the current date is not found alter the main table to add a new column and then update the meta data in the second table.

Does that make sense?
nathj
Nov 13 '07 #2
r035198x
13,262 8TB
Hi All,

This is Pavankumar, I am doing Attendance Management project in PHP.
What i want is as a day increases i want to alter the table with new filed with name current date(i,e) 01 Nov 07 for today, for tomarrow new filed with name 02 Nov 07 needs to be created. And each and every time it has to check for the particular column, if the column is not existing it has to create otherwise remain as it is.

Pl suggest me how to write the code.

Thank you.

Regards,
P Pavankumar
Which database are you using? A trigger could do it but perhaps your database does not allow triggers
Nov 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Marek Mänd | last post by:
I have problems with table row height by Internet Explorer6 in xhtml1 css1compat mode document. The table has fixed height and on one TFOOT row the height is set to 'auto' to make it have...
2
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error...
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
5
by: Phil Latio | last post by:
I have 2 virtually identical tables and wish to move data between them. Basically one table is called "live_table" and the other is named "suspended_table" and the only difference is that the...
1
by: daniellee2006 | last post by:
I am creating a basic website to store people profiles and within this website i have a page that creates a table dependent on the number of records in mysql written in PHP within these tables...
2
by: john | last post by:
Is it true that if I split my access database in backend and frontend and I implement custom auto increment for the ID fields, that my database is ready to be used in a multi-user environment? I...
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
2
by: des-sd | last post by:
Access Experts, Please help! I have looked through ref. manuals, Google Groups on "Auto Populate", and I am still lost. Problem #1 My DB is 2 relational tables of (1) sales transactions of,...
1
by: robertrozarioa | last post by:
Hi , I am new to ACCESS.please help me out. I am designing a database.I have 3 tables, and have 3 forms based to collect data. 1. Individual ( fields are Name, Email, Status) Status is a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.