Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. that did it.did it ask for a group since we added to fileds in one? now i just need to add all the filds up.thx
  2. that should be it but it gives me this? Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
  3. see i want to calculat how many hours i have done in a day.and a week. they bust my balls over over time..lol i dont understand the sum part?
  4. i tried this $query2 = "SELECT COUNT( `to_t1` )-( `from_t1`) AS Totalhours FROM `week1`; "; but it gives me -7h
  5. hey guys so i got this going but there sum is wrong?? $query2 = "SELECT COUNT( `to_t1` )-( `from_t1`)AS TotalNumber, SUM( `to_t1` )-( `from_t1`) AS Totalhours FROM `week1`; "; $result2 = mysql_query($query2) or die(mysql_error()); while($row = mysql_fetch_array($result2)) { echo $row['Totalhours'] ." H"; } 21H to_t1 is 17:30 and from_t1 is 9:30 how does it get 21?i need 8h
  6. problem.. every thing is working fine now..the only thing is that in my table time, i created field from_m1,from_m2..that represents from.. and 7 more to_m1,to_m2.. that represents the to in the days.. so i have this monday input filed(from_m1) to input filed(to_m1) now if i have more then one entry it screws up cause it show both. i need to assosiate monday to form_m1 and to_m1 and tuesday to form_m2 and to _m2...... i make one table week 1 and put the fields in that one. so the second time would go in week 2..... the only thing is for that to be associated ?(guess something like a drop down menu with week 1 week2 week 3 week 4 week 5..) the place that i would jam is how to determine if he selected week 1 to insert the data in that table..
  7. so SELECT sum( `time` ) AS TotalNumber, SUM( `time` ) AS Totalhours FROM `fc`;
  8. ya but what would be the php formula?cause lets say i make a database with monday input filed from to input field and it puts it in the database. to pull it out SELECT COUNT( `time` ) AS TotalNumber, SUM( `time` ) AS TotalPrice FROM `fc`;
  9. well i was more thinking of input forms.from time to what time and lunch for every day.
  10. hey guy im looking in to making a small web site that i can access from my blackberry to log my hours i do at work.. can somebody guide me in the write direction fro the calculations?
  11. i think im getting there.i forgot to close my div tag
  12. sorry the cell name i put this it works put the space between the pics is to mutch? div.thumb { float: vertical; width: 25%; border: thin silver solid; margin: 0.5em; padding: 0.5em; }
  13. featured is the table name..
  14. i got it going.but i need to space them out evenly.. see front page you see fetured cars i want 4 pics. in my admin panel when he adds a car i added a field feature or not. if it is he puts 1 to 5 SELECT * FROM employees WHERE featured ORDER BY RAND() LIMIT 1 , 4 http://canada-auto.com/site/view_test.php
  15. hey guy im making a car website for my buddy and i have a featured cars on the front page. now in my database i added a field featured im using this SELECT * FROM db WHERE featured ORDER BY RAND() on my page i added 4 boxes with code but i replicates it 4 times each featured car..all i one is 4 diffrent featured cars...
  16. aha!thx dude what i don't understant it was working yesthurday..lol anyways fixed and works!
  17. ok so i change it to mysql_query("INSERT INTO `employees`( name, email,phone,photo,thumb,numero,description,pics,pics2,kilometers,year) VALUES ('$name', '$email','$phone','$pic','$thumb','$num','$desc','$pics','$pics2','$kilo','$year')") ; mysql_query($query) or die('Error, add album failed : ' . mysql_error()); and get Error, add album failed : Query was empty
  18. you know what i think i know,i got an email last week from my hosting company saying that they will put register globals off. can it be that?i will try another way and see.
  19. hmm Parse error: syntax error, unexpected T_STRING in /home/canadaau/public_html/ADMIN/pics/add2.php on line 28 it is that same line..
  20. no thai is the messt up part..it redirects me when afther it is done like usal?
  21. hey guythis script was working fine yesturday and now..nothing.. it insert data from a form in my mysql db can sombody see if they can see a mistake in here..cause i played arround with it..lol <?php $target = "./"; $target2= "./"; $target3= "./"; $target = $target . basename( $_FILES['photo']['name']); $target2 = $target2 . basename( $_FILES['thumb']['name']); $target3 = $target3 . basename( $_FILES['pics']['name']); $target4 = $target4 . basename( $_FILES['pics2']['name']); $name=$_POST['name']; $email=$_POST['email']; $phone=$_POST['phone']; $pic=($_FILES['photo']['name']); $thumb=($_FILES['thumb']['name']); $num=$_POST['numero']; $desc=$_POST['description']; $pics=($_FILES['pics']['name']); $pics2=($_FILES['pics2']['name']); $kilo=$_POST['kilometers']; $year=$_POST['year']; // Connects to your Database mysql_connect("localhost", "canadaau_", "") or die(mysql_error()) ; mysql_select_db("canadaau_") or die(mysql_error()) ; //Writes the information to the database mysql_query("INSERT INTO `employees` VALUES ('$name', '$email', '$phone', '$pic','$num','$desc','$thumb','$pics','$pics2','$kilo','$year')") ; if(move_uploaded_file($_FILES['photo']['tmp_name'], $target)) { if(move_uploaded_file($_FILES['thumb']['tmp_name'], $target2)) { if(move_uploaded_file($_FILES['pics']['tmp_name'], $target3)) { if(move_uploaded_file($_FILES['pics2']['tmp_name'], $target4)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory"; echo "You'll be redirected to Home Page after (4) Seconds"; echo "<meta http-equiv=Refresh content=4;url=/ADMIN/index_cpanel.php>"; } else { echo "Sorry, there was a problem uploading your file."; } } } } ?>
  22. hey guy's im doing a project for my buddy.he is a trainer at my gym and i want to make him a web site with an admin panel for him o do his workout sheets. it is bassicly a grid and a tone of clipart.every customer is diffrent for exercies.. so the grid stays the same and the box for the image is going to be the same size as the cliparts. http://www.exrx.net/Store/Other/PhysigrapheSamples.html so it is to insert the image in the rigth box.or associate the image with the field. i have to choices ajax or php?right the drag and drop from ajax..but i think php would be easyer..i just need guidance in the wright direction..thx
  23. supprising cause this comes out of a book?? is this cause of the version?
  24. standard Quotes where are they?i was saying maybe this( ,)
×
×
  • 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.