Jump to content

lioslios

Members
  • Posts

    24
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

lioslios's Achievements

Member

Member (2/5)

0

Reputation

  1. hello guys i have 2 time variables $time1 = 22:00; $time2 = 03:00; my $current_time is 01:00 how can i figure that $current_time is betwean the $time1 and $time2 the if ($current_time > $time1 && $current_time < $time2) works if the day not change! is any way to ignore the day change thanks
  2. josh problem now i check better in the funcion i wand to know the part time i am by the current time of server the $day_starts_to_count_from is just an offset type (and set that the day dont change at the 00:00 night but 07:00 at morning! so the first of the 4 parts is 07:00-12:00 ) and if the server time is 11:00 then im at the first part!!!!! thanks
  3. joshthank you verry much, its beter the fumction to return me the start and end time of the part also!, so if you can chenge, il be greatfull Psychoyou have write with daylight savings but i dont think is problem, but when i finish the entire script i emulate this to see how it goes
  4. hello guys i wand to split the 24h of a day to parts and select the time that i wand to start the 24h circle to count! lets say i give 2 int variables $day_starts_to_count_from=00; $split_day_to_parts=4; so! $hours_per_part = 24/$split_day_to_parts; this gives me $hours_per_part = 6 (i split the 24h every 6hr) how to know the part of my current hour? lets say the system time is 15:35 how to find that im at the 3d part 12:00-18:00 if the 24h circle starts to count from 00:00 thanks in advance
  5. guys! i have create an ordering application and works fine, but some times throws errors on session variables, always on diftent thing any idea for this?? thanks. (the user stays login for serveral hours 6-7 on each login)
  6. yes uses sessions but i kill the session only with logout button
  7. i hafe an ordering application, so the client pc some times stay long time on the page without do nothing! so after some time, if i make a selection h get some errors on the page, and i must logout and login agen! is any time out configuration on php or apache (i dont use cookies in my code so no time out for cookies) thanks
  8. my english is no so good sorry can i use this?? COUNT(productname*quantity) sample tabe quantity*******productname 1 car 1 car 2 boat 1 boat 1 car so to get the resault boat = 3 car = 3 as it is this time i get boat = 2 car = 3 thanks
  9. ok this works fine! one more question, i get the similar products eg cars says 20 but in the records i have and the quantity field that says 5 cars for a record so the count must be productname * quantity for each record! the result is xorrect only if quantity is 1 $result = mysql_query("SELECT id,productname,price,quantity,finalprice,seller,datetime, COUNT(productname)AS num FROM orderhistory GROUP BY productname ORDER BY num DESC"); while ($row = mysql_fetch_assoc($result)) { echo "<tr>"; foreach($row as $cell) echo "<td ALIGN=\"center\">$cell<FONT></td>"; echo "</tr>\n"; } thanks
  10. guys i have 2 tables one is the product table and holds the id,productname,price and second tables is the daysales and holds the slles of the day in the fiels id,productname,price,seller,datetime... my script works as: if a saler sells somthing then the sale stores to the daysales table! and in the end of day i use a button to diplay the intire table on the webpage and this works too!!! if(isset($_POST['sub11'])) { if ($_SESSION['read_data']==1) { $result = mysql_query("SELECT * FROM $serv"); while ($row = mysql_fetch_assoc($result)) { echo "<tr>"; foreach($row as $cell) echo "<td ALIGN=\"center\">$cell<FONT></td>"; echo "</tr>\n"; } } } BUT I WAND TO ADD a second table that displays the "same products" e.g. if the product car sells more than one time then i wand to get the car is 3 times selled!!! the boat 6 times ... ... ... any idea for this? thanks
  11. hello with tis button i generate some statistics from mysql if(isset($_POST['sub1'])) { $result = mysql_query("SELECT servitoros1, COUNT(*) from history WHERE serv LIKE '%be%' group by serv1"); while($row = mysql_fetch_row($result)) { echo "<tr>"; foreach($row as $cell) echo "<td ALIGN=\"center\">$cell<FONT></td>"; echo "</tr>\n"; } mysql_free_result($result); } but each record have datetime field!! so how can i set this display betwean 2 selectable datetimes e.g. from 2/2/2011 15:45 to 3/2/2011 23:59
  12. guys i have this dropdown menu echo "<form method=\"post\" action=\"\">"; echo "<center><select name=\"mydropdown\" size=\"0\" style=\"height:4em; width:15em;\">"; echo "<option value=\"Milk1\">{$_SESSION['tem1']}</option>"; echo "<option value=\"Milk2\">{$_SESSION['tem2']}</option>"; echo "<option value=\"Milk3\">{$_SESSION['tem3']}</option>"; echo "</select></center>"; echo "</form>"; and i wand to update a variable every time i select one of the contents... how can i done this???
  13. guys i wand to execute a program on my seerver, i use the $_SESSION['tmp'] = exec("print.exe", $results); and works but when i change the directory $_SESSION['tmp'] = exec("d:\\print\\user1\\print.exe", $results); dont work, works only in root directory, is any way to set the execution to other directorys?? thanks
  14. sorry AyKay47 my mistake the ORDER BY "lastname" in the SELECT solve my problem im beginer with this.. thanks thanks verry much
  15. Hello guys, im wonder if ca i syntax the insert so i can insert some fields with alphabeticly shorting by name field Thanks
×
×
  • 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.