Jump to content

Taku

Members
  • Posts

    44
  • Joined

  • Last visited

Taku's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. oh sorry my apologies mam :c and I think I get what u meant now about creating a new table....>.< crap I will do that now, gonna go back here again >.< tnx so much
  2. well here is what I wanted to do... 1. I will choose a add function and then enter the name of that new branch 2. And then I want that branch to auto create a table after putting it in? or after pressing a button? 3. And then I want a drop down list thingy that will show all the branches, including the new one and then show its table :B yah I really need to logic on this one.. `.` tnx for replies
  3. I see... I will ask again.. is it possible to create a table whose name will be the value that is selected in a drop down? tnx for the replies!
  4. is that so :c... well I think this will work wherein I as soon as the user entered a data(via textfield) I will create a table with it.. now my problem is how to view those table and add them in the page..
  5. sorry for double post I cant edit the one above what I want to happen is auto-create a table that has a name based on the column emp... or when a user entered a data.. it will auto-create a table for that data
  6. I wanted to create a table that is based on the values inside another table example: table emp id emp 1 sec 2 pres what I want is when I add another data there it will auto create a table for them Hope someone can help tnx!
  7. I tried doing the 1st one it still gave me 0000-00-00 and the 2nd one work.. tnx so much guess I will use this one
  8. //+90 days $date = date("Y-m-d",strtotime("+90 day")); $date1 = date("Y-m-d",strtotime($date)); echo $date1; if(isset($_POST['Submit'])) { if(!$date1) { } else { $query1 = "UPDATE testdate SET end = $date1 WHERE id=1"; mysql_query($query1) or die('error'.mysql_error()); } } guys help... I wanted to get the default date then add 90 days on it and then update the table with its values.. but all I get is 0000-00-00
  9. Taku

    Question

    guess I will think of a way and post here if it is right xDD
  10. Taku

    Question

    I see tnx for this :3 I see... if I will not use date.. what is a good way to make a new table for each day? :B what I want to do is... it will create a new table everyday
  11. Taku

    Question

    ohh tnx so much :3.. I will read it and yea I need to create the table... btw is creating a table name using date possible?
  12. Taku

    Question

    After using inner join and getting ur desired values.. how to enter this values to a new table? tnx for replies :B
  13. ohhh tnx psycho, I think I got now the idea.. and if I want to subtract something I will add subtraction in the end? like this? SELECT t1.id, t1.quantity AS qty1, t2.quantity AS qty2, t3.quantity AS qty3, t4.quantity AS qty4, t5.quantity AS qty5 (t1.quantity + t2.quantity + t3.quantity + t4.quantity - t5.quantity) as total FROM table1 AS t1 INNER JOIN table2 AS t2 ON t2.id = t1.id INNER JOIN table3 AS t3 ON t3.id = t1.id INNER JOIN table4 AS t4 ON t4.id = t1.id INNER JOIN table5 AS t5 ON t5.id = t1.id
  14. sorry for disturbing again... I did try to do this.. and it seems not working `.` can someone explain what did I do wrong and how to fix this? :B tnx so much $sql = " SELECT t1.id, t1.quantity, t2.quantity, t3.quantity, t4.quantity (t1.quantity+t2.quantity+t3.quantity+t4.quantity) as total FROM t1 INNER JOIN t2 ON t2.id = t1.id INNER JOIN t3 ON t3.id = t2.id INNER JOIN t4 ON t4.id = t3.id $qry = mysql_query($sql); while($row = mysql_fetch_assoc($qry)) { echo $row['total']. '<br/>'; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.