Jump to content


  • Posts

  • Joined

  • Last visited

1 Follower

About jimfog

  • Birthday 10/28/1979

Previous Fields

  • Languages
    Englsh, Greek

Contact Methods

  • MSN

Profile Information

  • Location
    Athens, Greece
  • Interests
    Computing, in any form of it, whether is web development, control theory or other, enjoy reading history books, especially WWII books, movies, fast cars(i do not have one, just a humble toyota yaris).

Recent Profile Visitors

26,527 profile views

jimfog's Achievements

Dedicated Member

Dedicated Member (4/7)



  1. that did,,,not used to in applying the rules of logic in sql...probably you might say that they no differ from other languages and you would be right....anyway..tnanks.
  2. take a look at this query...it has a series of AND clasues..pay attention to the 3rd commented..it sums up what I want to do. SELECT lastname,city FROM users INNER JOIN business_users ON business_users.user_ID=users.user_ID WHERE users.active=1 AND business_users.sched_entered =1 AND business_users.services_entered=1 --and business.users.staff_entered=1 only if business.users.sraff_enfaged_in_appt=1 AND lastname LIKE 'p%'; I want to ask as prerequisite business.users.staff_entered ONLY if business.users.sraff_enfaged_in_appt column is true. How I would go about achieving that?
  3. unless my provider gives me a static IP..correct?
  4. I know that apache with htaccess offers the choice of allowing access to a site only from one IP. The question is if this has any sense if the allowed IP is dynamic?
  5. Ok...I will put it this way in case I was not specific. The user might put whatever value he/she likes...even values not matching any value from the menu....and he leaves the value there in the input with no selection making....that is undesirable but in the case of autocomplete scenarios we are examining probable..entering a custom value and NOT choosing from the menu. Unless I miss sth in the above logic. In case I confused you sorry...what I am trying to say is that I must find a way to enforce selection..that is the key here.
  6. well...datalist seems to have some browser incosistencies plus the fact that it has the same drawback search like functionality....the user can enter whatever value he likes. The nice thing about select is that the user can only choose from predefined options but that bad thing is that it is not the best solution when a menu has many choices...in my case about 70.
  7. there is one slight problem though with this "search like" feature. The user can enter an invalid value...a value not included in the medical specialties....whereas with a dropdown menu(select tag) he//she can only enter predefined(valid) values. Any workaround to the above problem?
  8. some clarifications.... You said ajax call for the auto complete...kind like a search feature?...keyword is sent w ajax then query echo the results back. When you say to limit the choice....I suppose you mean what is actually seen by the user....the specialties are 65+ one way or the other. The results appearing(the specialties) must reflect the keyword...and when typing a keyword the user will see only the specialties starting from that keyword....which is less than 10. I do not see a problem with that. From the moment he starts typing the keyword in reality he/she never sees 65 options. I hope it is more clear now...what do you think?
  9. My user is a doctor who must choose what medical specialty he/she is..that said choose from 65+ options. So I must use a drop menu here(select tag). Q1:Do you think I sould use an autocomplete feature? Q2:Using an autocomplete feature or not...what do you think is the best implementation for the above scenario? Putting it more simple...how to go about implementing a dropdown list with about 65+ options. I have seen various implementation in the web but confused about which to choose about my use case. Thanks.
  10. that is what I was expecting to hear...many thanks.
  11. I have a container with list items: <fieldset id="column_contai"> <ul> <li>maria</li> <li>anthi</li> <li>Nikos</li> <li>maria</li> <li>anthi</li> <li>Nikos</li> <li>maria</li> <li>anthi</li> <li>Nikos</li> <li>maria</li> <li>anthi</li> <li>Nikos</li> </ul> </fieldset> I want the height to be auto adjusted depending on the content and when it reaches a threshold(PX for example)...hide the rest and display a scrollbar. I know that the last one is a metter of overflow but I do not kbow how to achieve the first feature.
  12. I have a table that stores the hours of the week a business(hair salon for example) is open monday 11:00 to 18:00 tuesday etx so on so on CREATE TABLE `store_open` ( `id` int NOT NULL AUTO_INCREMENT, `b_user_ID` mediumint unsigned DEFAULT NULL, `open_time` time DEFAULT NULL, `close_time` time DEFAULT NULL, `open_time_b` time DEFAULT NULL, `close_time_b` time DEFAULT NULL, `day` tinyint DEFAULT NULL, PRIMARY KEY (`id`), KEY `b_user_ID` (`b_user_ID`), KEY `day_idx` (`day`), CONSTRAINT `day` FOREIGN KEY (`day`) REFERENCES `weekdays` (`dayID`) ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 the day foreign key refrences this table here..which holds the days of the week, CREATE TABLE `weekdays` ( `dayID` tinyint NOT NULL AUTO_INCREMENT, `days` varchar(45) DEFAULT NULL, PRIMARY KEY (`dayID`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 QUESTION... I must also store the days where the business will be closed...do you think a separate table for that is needed? Which I assume this table will have a foreing key referencing the weekdays table.... OR you think is better to add another column to the store_open table(probably a boolean-closed or no closed) In that last scenario the days that the business will be closed the values of open_time,close_time(see the store open table create statement) will be set to null.
  13. in_array does not search in multi-dimentional arrays...I did found some code to do it though but I avoided after all cause was more complex than the code above. Sorry for the late response.
  14. thanks for the answer,,,I just want your opinion in this code below since I wrote it BEFORE you answer. thanks again $i=0; while($i<count($_POST['services'])){ if(array_search($_POST['services'][$i], array_column($serviceslist, "serviceID"))===false) { echo json_encode('nosuchservice'); return; } $i++; }
  15. I have 2 arrays $_POST['services'][0]);///this is '31'....but it can contain more than one value $serviceslist);...this is a multidimentional array array(1) { [0]=> array(2) { ["service"]=> string(7) "haircut" ["serviceID"]=> int(31) } } I tried the following code....but it does not work and the reason being it assumes that $servicelist is one-dimentional array. if (is_array($_POST["services"])) { $i=0; while($i<count($_POST['services'])) { if ((in_array($_POST['services'][$i],$serviceslist))==false) { $error='nosuchservice'; echo json_encode($error); return; } $i++; } // return; } how can I search in $secviselist for the values contained in $_POST['services']; The above code shoud output true since I do not use the strict paramaeter...31 exists in both. What adjustments I have to make?
  • Create New...