mysql - table structure for creating 13 rows and 31 colums -


i new mysql , sql. want create table entering 12 months , 31 days infront of it. not getting how structurise it.

in left hand side should months name , infront of each month enter 31 days each.

if use

create table allocate (          id int,          month varchar(50), days int(10)        ); 

it not solve purpose.

here css design of table data entered , same need table in mysql

<table width="99%" border="1" cellspacing="1" cellpadding="1" align="center"> <form name="form1" action="submit.php" method="post">   <tr bgcolor="#00bfff">     <td><strong>month</strong></td>     <td width="3%">1</td>     <td width="3%">2</td>     <td width="3%">3</td>     <td width="3%">4</td>     <td width="3%">5</td>     <td width="3%">6</td>     <td width="3%">7</td>     <td width="3%">8</td>     <td width="3%">9</td>     <td width="3%">10</td>     <td width="3%">11</td>     <td width="3%">12</td>     <td width="3%">13</td>     <td width="3%">14</td>     <td width="3%">15</td>     <td width="3%">16</td>     <td width="3%">17</td>     <td width="3%">18</td>     <td width="3%">19</td>     <td width="3%">20</td>     <td width="3%">21</td>     <td width="3%">22</td>     <td width="3%">23</td>     <td width="3%">24</td>     <td width="3%">25</td>     <td width="3%">26</td>     <td width="3%">27</td>     <td width="3%">28</td>     <td width="3%">29</td>     <td width="3%">30</td>     <td width="3%">31</td>   </tr>   <tr>     <td>january</td>     <td><input type="text" name="jan1" id="jan1" style="width:87%;" /></td>     <td><input type="text" name="jan2" id="jan2" style="width:87%;" /></td>     <td><input type="text" name="jan3" id="jan3" style="width:87%;" /></td>     <td><input type="text" name="jan4" id="jan4" style="width:87%;" /></td>     <td><input type="text" name="jan5" id="jan5" style="width:87%;" /></td>     <td><input type="text" name="jan6" id="jan6" style="width:87%;" /></td>     <td><input type="text" name="jan7" id="jan7" style="width:87%;" /></td>     <td><input type="text" name="jan8" id="jan8" style="width:87%;" /></td>     <td><input type="text" name="jan9" id="jan9" style="width:87%;" /></td>     <td><input type="text" name="jan10" id="jan10" style="width:87%;" /></td>     <td><input type="text" name="jan11" id="jan11" style="width:87%;" /></td>     <td><input type="text" name="jan12" id="jan12" style="width:87%;" /></td>     <td><input type="text" name="jan13" id="jan13" style="width:87%;" /></td>     <td><input type="text" name="jan14" id="jan14" style="width:87%;" /></td>     <td><input type="text" name="jan15" id="jan15" style="width:87%;" /></td>     <td><input type="text" name="jan16" id="jan16" style="width:87%;" /></td>     <td><input type="text" name="jan17" id="jan17" style="width:87%;" /></td>     <td><input type="text" name="jan18" id="jan18" style="width:87%;" /></td>     <td><input type="text" name="jan19" id="jan19" style="width:87%;" /></td>     <td><input type="text" name="jan20" id="jan20" style="width:87%;" /></td>     <td><input type="text" name="jan21" id="jan21" style="width:87%;" /></td>     <td><input type="text" name="jan22" id="jan22" style="width:87%;" /></td>     <td><input type="text" name="jan23" id="jan23" style="width:87%;" /></td>     <td><input type="text" name="jan24" id="jan24" style="width:87%;" /></td>     <td><input type="text" name="jan25" id="jan25" style="width:87%;" /></td>     <td><input type="text" name="jan26" id="jan26" style="width:87%;" /></td>     <td><input type="text" name="jan27" id="jan27" style="width:87%;" /></td>     <td><input type="text" name="jan28" id="jan28" style="width:87%;" /></td>     <td><input type="text" name="jan29" id="jan29" style="width:87%;" /></td>     <td><input type="text" name="jan30" id="jan30" style="width:87%;" /></td>     <td><input type="text" name="jan31" id="jan31" style="width:87%;" /></td>   </tr> 

someone plz suggest me how structurise it. thanks

i believe need create table column named "month" , 30 other columns naming day1-day30.i don't understand purpose of such table. nevertheless

the query table creation in sql is:

create table table_name ( column_name1 data_type(size), column_name2 data_type(size), column_name3 data_type(size), .... .... );

for requirement, can use:

create table allocate (
month varchar(50), day1 int(3),day2 int(3),day4 int(3),......................,day30 int(3) );

if new sql,i suggest go through below links understand basics concepts of rdbms:

http://www.w3schools.com/sql/


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -