Jump to content

lenerd3000

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by lenerd3000

  1. rounding up is really my problem. since there is no fixed time for some of the employees. i decided to make a schedule of work as my reference and will be encoded in the database but since they can assign another employee to any time, any day, that will be useless. i work in a call center so there are agents who will be rescheduled on night at this time or day at that time. if i make it to 9 working hours, some can extend to 15hours or how about it is overtime.
  2. I only need the interval of the two expressions. I am making our timeclock for our employee time record. any suggestion/idea/scripts for this project?
  3. oh great... thank you again. that will solve my problem
  4. thanks to all ill try that... and how can i turn it back to time? the strtotime?
  5. just a simple question. how can i know the hour difference of yesterday and today.. like: 2008-05-06 13:00:00 - 2008-05-06 12:00:00 = 1 hour
  6. really? i thought my syntax is already 5.. sori if it is...
  7. is there's a way how can i access parent class member in another class? class test { function t();{} } class test2 extends test { function t2();{} } class test3 extends test { function t3(); { // can i access t2 from here which is also a member of test class? } }
  8. ok thank you for your time in helping me. maybe it is not possible what is am thinking.
  9. its too simple logic but hard for me to do. i want to use a class that calls all the classes i write base on what i need in one call. i have test1, test2, test3 classes separately and i will make a test4 class which if call, test1-test3 class will be inherited. do you know cakephp? i want to make framework and i base in on cake i dont know how did they integrate all the class and function in cake but when i try to trace it up, all of them inherits a class named Object. and all of the built-in classes can be call using $this-> but i cant figure out where did they made a connection for all the class.
  10. is there's no other solution? i have done that but i need more flexible code.
  11. how can I access the other class with using the class in the index. i want to get all the class in one class so i can use them all but since classes in php could not make multiple extends
  12. hello, i have 2 classes on different page and will inherit a class from a 3rd page. now, i have my index page with a class inherited the class on the 3rd page. when i try to get function from the parent its ok but my problem is when i try to access the functions from the first 2 classes... how can i call the class that is a member of my parent?? test1.php class test1 extends test { function t1() { echo "test1"; } } test2.php class test1 extends test { function t2() { echo "test2"; } } test.php class test { function t() { echo "test"; } } index.php class access extends test { } $test = new test(); $test->t; // OK $test->t1; // ERROR $test->t2; // ERROR
  13. i have a functions declared in the other page and a class in another page... is it possible to make the functions become my class's own functions? i want to make a simple core files for my website.
  14. hello, suppose i have a default timezone of eastern, set using date_default_timezone_set() and i want to show date and time in 4 timezones namely, easter, central, mountain and pacific. how can i do that when my default timezone is eastern. i want to show this 4 timezones, date and time, in the same page.
  15. hello, anyone knows here how to convert am to pm and pm to am... thats the question of my friend i couldnt answer. he tells me that i should not change the timezone. of course in days we can add and subtract but how it is done in am and pm... pls help
  16. hello, i have created a query that is to search text in my database and it goes well. but my friend the other day is complaining that he did not find what he search in the database but actually the data is really in there.. the data contains ampersand(&) like 'tom & jerry' and also a text 'mcs of tampa inc'. my query is this: select * from mytable where mytext like '%mcs of tampa inc%' select * from mytable where mytext like '%tom & jerry%' in the first query, it runs ok when the text is 'mcs of tampa' but if i complete it to 'mcs of tampa inc' no results has been return. is theres a special characters their? pls tell me... thank you
  17. this is my expression: select '858-659-5595' REGEXP '?[\(]858?[\)]?[\-\. ]659?[\-\. ]5595' but it produce this error: #1139 - Got error 'repetition-operator operand invalid' from regexp my only problem is how can i tell the regexp the parenthesis () is optional. the rest is ok only the parenthesis part is not.
  18. thanks for the advice. ill try to standardize the phone numbers now. but i have data already on my database. :'(
  19. sounds like a good idea.. but i cant change now a thousand records of phone number for the standardization. i have already inserted it in my database... any other idea... the website is already online. i am trying to make a good regex for that.
  20. im not sure about this but i think it worth a try... Select distinct(fieldname) from table1 where fieldname not exists (select distinct(fieldname) from table2 and not exists (select distinct(fieldname) from table3)
  21. hello, anyone here knows this problem? i have phone numbers in my database and there's 3 formats 1. (555) 235-6589 2. 125 246 4256 3. 124.265.1545 my problem is how can i compare my input from my phone number. i need a unique phone number in my database. what if the inputted format is 265 568 5659 how can i compare it in a phone number with this format 265.568.5659 or (265) 568-5659. i know how to get numbers in the inputted data but i dont know how to get numbers from the database's phone numbers so that the comparing of the two data will be all number like this 2655865659 = 2655865659.... any good idea for this problem? i appreciate it most.
  22. function close() { if (schedules.closed) { location.href='index.php' } else if (!schedules.closed) { schedules.close() location.href='index.php' } } my redirection is ok and also the function if schedules.closed will be remove. schedules.close() is working. only the schedules.closed is my problem... tnx for the reply
  23. function close() { if (schedules.closed) { //redirect page } else if (!schedules.closed) { shedules.close() //redirect page } } after i click my button it will call that function that determine if my popup window is open or not and then redirect. my problem is if my window is close, suppose to be it will only redirect but its not... and if my window if open it will close the window then redirect...
  24. i have a question about this function of javascript. if (schedules.closed) { do something } else if (!schedules.closed) { do something } the first function does not working. i dont know why but the latter does what i want. what is the problem their.
×
×
  • 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.