Search Results

Search found 292 results on 12 pages for 'doctor fro'.

Page 2/12 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • ROR accepts_nested_attributes_for one to many relationship with selection

    - by bilash.saha
    I have two models Doctors and Questions like the follwong: Doctor Model class Doctor < ActiveRecord::Base has_many :questions has_many :brands accepts_nested_attributes_for :questions end Question model class Question < ActiveRecord::Base belongs_to :discipline belongs_to :doctor belongs_to :brand end Now you can clearly see that Doctor has many questions and brands and question belongs to doctor and brand.I want to add previously saved question to a doctor from doctors edit page. I want to remove them as well.How can I proceed ? I tried like : <%= form.fields_for :questions, question,:child_index => (question.new_record? ? "index_to_replace_with_js" : nil) do |question_form| %> <table> <tr> <td> <div class="label">Select Question</div> <%= question_form.collection_select :id, Question.all, :id, :title ,{:include_blank => true } %> </td> </tr> </table> but this doesnot works for me.Can you give me a solution with proper example ?

    Read the article

  • Linq like or other construction

    - by Yauhen Kavalenka
    I have DB oracle in my solution. I want to have some results in this query. Query example: select * from doctor where doctor.name like '%IVANOV_A%'; But if i do it at LINQ i cannot get any result. from p in repository.Doctor.Where(x => x.Name.ToLower().Containsname)) select p; Where 'name' is variable of string parameter. Web layout request next string: "Ivanov a" or "A Ivanov" But i suggest for user choose you pattetn for query. How i can to get "patient by name" if name consist of "First name" and "Last name" but user doesn't know your doctor's full name?

    Read the article

  • Content in Context: The right medicine for your business applications

    - by Lance Shaw
    For many of you, your companies have already invested in a number of applications that are critical to the way your business is run. HR, Payroll, Legal, Accounts Payable, and while they might need an upgrade in some cases, they are all there and handling the lifeblood of your business. But are they really running as efficiently as they could be? For many companies, the answer is no. The problem has to do with the important information caught up within documents and paper. It’s everywhere except where it truly needs to be – readily available right within the context of the application itself. When the right information cannot be easily found, business processes suffer significantly. The importance of this recently struck me when I recently went to meet my new doctor and get a routine physical. Walking into the office lobby, I couldn't help but notice rows and rows of manila folders in racks from floor to ceiling, filled with documents and sensitive, personal information about various patients like myself.  As I looked at all that paper and all that history, two things immediately popped into my head.  “How do they find anything?” and then the even more alarming, “So much for information security!” It sure looked to me like all those documents could be accessed by anyone with a key to the building. Now the truth is that the offices of many general practitioners look like this all over the United States and the world.  But it had me thinking, is the same thing going on in just about any company around the world, involving a wide variety of important business processes? Probably so. Think about all the various processes going on in your company right now. Invoice payments are being processed through Accounts Payable, contracts are being reviewed by Procurement, and Human Resources is reviewing job candidate submissions and doing background checks. All of these processes and many more like them rely on access to forms and documents, whether they are paper or digital. Now consider that it is estimated that employee’s spend nearly 9 hours a week searching for information and not finding it. That is a lot of very well paid employees, spending more than one day per week not doing their regular job while they search for or re-create what already exists. Back in the doctor’s office, I saw this trend exemplified as well. First, I had to fill out a new patient form, even though my previous doctor had transferred my records over months previously. After filling out the form, I was later introduced to my new doctor who then interviewed me and asked me the exact same questions that I had answered on the form. I understand that there is value in the interview process and it was great to meet my new doctor, but this simple process could have been so much more efficient if the information already on file could have been brought directly together with the new patient information I had provided. Instead of having a highly paid medical professional re-enter the same information into the records database, the form I filled out could have been immediately scanned into the system, associated with my previous information, discrepancies identified, and the entire process streamlined significantly. We won’t solve the health records management issues that exist in the United States in this blog post, but this example illustrates how the automation of information capture and classification can eliminate a lot of repetitive and costly human entry and re-creation, even in a simple process like new patient on-boarding. In a similar fashion, by taking a fresh look at the various processes in place today in your organization, you can likely spot points along the way where automating the capture and access to the right information could be significantly improved. As you evaluate how content-process flows through your organization, take a look at how departments and regions share information between the applications they are using. Business applications are often implemented on an individual department basis to solve specific problems but a holistic approach to overall information management is not taken at the same time. The end result over the years is disparate applications with separate information repositories and in many cases these contain duplicate information, or worse, slightly different versions of the same information. This is where Oracle WebCenter Content comes into the story. More and more companies are realizing that they can significantly improve their existing application processes by automating the capture of paper, forms and other content. This makes the right information immediately accessible in the context of the business process and making the same information accessible across departmental systems which has helped many organizations realize significant cost savings. Here on the Oracle WebCenter team, one of our primary goals is to help customers find new ways to be more effective, more cost-efficient and manage information as effectively as possible. We have a series of three webcasts occurring over the next few weeks that are focused on the integration of enterprise content management within the context of business applications. We hope you will join us for one or all three and that you will find them informative. Click here to learn more about these sessions and to register for them. There are many aspects of information management to consider as you look at integrating content management within your business applications. We've barely scratched the surface here but look for upcoming blog posts where we will discuss more specifics on the value of delivering documents, forms and images directly within applications like Oracle E-Business Suite, PeopleSoft Enterprise, JD Edwards Enterprise One, Siebel CRM and many others. What do you think?  Are your important business processes as healthy as they can be?  Do you have any insights to share on the value of delivering content directly within critical business processes? Please post a comment and let us know the value you have realized, the lessons learned and what specific areas you are interested in.

    Read the article

  • ASP.NET application within wordpress installation on IIS 7

    - by fro
    Hi all, a client has a wordpress installation on their IIS server located at www.mydomain.com. We would like to put our asp.net application in a subdirectory of the wordpress installation - at something like mydomain.com/asp. When I navigate to that directory I get a standard wordpress "Page not found" error. I am more familiar with htaccess, so how would I get wordpress to ignore a subdirectory in IIS? Thanks!

    Read the article

  • Represent multiple Null/Generic objects in an ActiveRecord association?

    - by slothbear
    I have a Casefile model that belongs_to a Doctor. In additional to all the "real" doctors, there are several generic Doctors: "self-treated", "not specified", and "removed" (it used to have a real doctor, but no longer does). I suspect there will be even more generic values in the future. I started with special "doctors" in the database, generated from seed. The generic Doctors only need to respond to the "name" and "real_doctor?" methods. This worked with one, was strained with two, and now feels completely broken. I want to change the behavior and can't figure out how to test it, a bad sign. Creating all the generic objects for testing is also trouble, including fake values to pass validation of the required Doctor attributes. The Null Object pattern works well for one generic object. The "name" method could check casefile.doctor.nil? and return "self-treated", as demonstrated by Craig Ambrose. What pattern should I use when there are multiple generic objects with very limited state?

    Read the article

  • Drupal rest services in Json format

    - by Sreekanth Chandrabhatla
    Amworking on drupal 7. Created a rest services in drupal views. I want to consume this service in my android app. When i try to view my service http://mysite.com/ubercart/?q=doctor am getting response like this [{,"foaf:Document"],"title":{"predicates":["dc:title"]},"created":{"predicates":["dc:date","dc:created"],"datatype":"xsd:dateTime","callback":"date_iso8601"},"changed":{"predicates":["dc:modified"],"datatype":"xsd:dateTime","callback":"date_iso8601"},"body":{"predicates":[""vid":"12","uid":"1","title":"raja","log":"","status":"1","comment":"2","promote":"0","sticky":"0","nid":"12","type":"doctor","language":"und","created":"1351849158","changed":"1351849158","tnid":"0","translate":"0","revision_timestamp":"1351849158","revision_uid":"1","field_rating":{"und":[{"value":"4"}]},"field_place":{"und":[{"value":"Guntur","format":null,"safe_value":"Guntur"}]},"rdf_mapping":{"rdftype":["sioc:Item","foaf:Document"],"title":{"predicates":["dc:title"]},"created":{"predicates":["dc:date","dc:created"],"datatype":"xsd:dateTime","callback":"date_iso8601"},"changed":{"predicates":["dc:modified"],"datatype":"xsd:dateTime","callback":"date_iso8601"},"body":{"predicates":["content:encoded"]},"uid":{"predicates":["sioc:has_creator"],"type":"rel"},"name":{"predicates":["foaf:name"]},"comment_count":{"predicates":["sioc:num_replies"],"datatype":"xsd:integer"},"last_activity":{"predicates":["sioc:last_activity_date"],"datatype":"xsd:dateTime","callback":"date_iso8601"}},"cid":"0","last_comment_timestamp":"1351849158","last_comment_name":null,"last_comment_uid":"1","comment_count":"0","name":"admin","picture":"0","data":"b:0;","uc_order_product_id":false,"ucnc_product_nid":false},{"vid":"11","uid":"1","title":"ravi","log":"","status":"1","comment":"2","promote":"0","sticky":"0","nid":"11","type":"doctor","language":"und","created":"1351849131","changed":"1351849131","tnid":"0","translate":"0","revision_timestamp":"1351849131","revision_uid":"1","field_rating":{"und":[{"value":"5"}]},"field_place":{"und":[{"value":"Hyderabad","format":null,"safe_value":"Hyderabad"}]},"rdf_mapping":{"rdftype":["sioc:Item","foaf:Document"],"title":{"predicates":["dc:title"]},"created":{"predicates":["dc:date","dc:created"],"datatype":"xsd:dateTime","callback":"date_iso8601"},"changed":{"predicates":["dc:modified"],"datatype":"xsd:dateTime","callback":"date_iso8601"},"body":{"predicates":["content:encoded"]},"uid":{"predicates":["sioc:has_creator"],"type":"rel"},"name":{"predicates":["foaf:name"]},"comment_count":{"predicates":["sioc:num_replies"],"datatype":"xsd:integer"},"last_activity":{"predicates":["sioc:last_activity_date"],"datatype":"xsd:dateTime","callback":"date_iso8601"}},"cid":"0","last_comment_timestamp":"1351849131","last_comment_name":null,"last_comment_uid":"1","comment_count":"0","name":"admin","picture":"0","data":"b:0;","uc_order_product_id":false,"ucnc_product_nid":false},{"vid":"10","uid":"1","title":"sree","log":"","status":"1","comment":"2","promote":"0","sticky":"0","nid":"10","type":"doctor","language":"und","created":"1351849109","changed":"1351849109","tnid":"0","translate":"0","revision_timestamp":"1351849109","revision_uid":"1","field_rating":{"und":[{"value":"4"}]},"field_place":{"und":[{"value":"Hyderabad","format":null,"safe_value":"Hyderabad"}]},"rdf_mapping":{"rdftype":["sioc:Item"content:encoded"]},"uid":{"predicates":["sioc:has_creator"],"type":"rel"},"name":{"predicates":["foaf:name"]},"comment_count":{"predicates":["sioc:num_replies"],"datatype":"xsd:integer"},"last_activity":{"predicates":["sioc:last_activity_date"],"datatype":"xsd:dateTime","callback":"date_iso8601"}},"cid":"0","last_comment_timestamp":"1351849109","last_comment_name":null,"last_comment_uid":"1","comment_count":"0","name":"admin","picture":"0","data":"b:0;","uc_order_product_id":false,"ucnc_product_nid":false}] Actually i need response like this {"nodes":{"0":{"node":{"title":"raja","field_place":"Guntur","rating":"4"}},"1":{"node":{"title":"ravi","field_place":"Hyderabad","rating":"5"}},"2":{"node":{"title":"sree","field_place":"Hyderabad","rating":"4"}}}} Do any one can me out?

    Read the article

  • apache2 mod_proxy configuration for single threaded servers

    - by The Doctor What
    I have a multiple instances of thin running behind apache 2.2's mod_proxy. The problem I have is that a couple pages, by design, take a while to run. If I just configure apache the obvious way (just add the thin urls as BalanceMember lines and no other configurations) then what happens is if someone clicks on the long-running page, then if enough web requests happen while it is running, someone eventually gets the same thin server and has to wait. Does anyone have some best practices or suggested configuration for mod_proxy and thin? Ciao!

    Read the article

  • Dsquery nested groups

    - by Doctor Trout
    Hi there, How would I write a dsquery to get a list of all the members of a d-list, expanding any nested groups to get the members of those groups? I've written this: dsquery * -filter "(&(memberOf=cn=...))" -r -limit 0 -attr CUSTOMFIELD sAMAccountName displayName > export.txt but returns nested d-lists and I want to expand these. I then tried this: dsquery group -samid "NAME | dsget group -members -expand > export.txt But this just lists the OU of each member and I want to get the Account Name and a custom field returned. Is there any way, either of chosing which fields to return from dsget or to epxand dsquery to show nested group membership? Thanks.

    Read the article

  • This weird behaviour from cronjob

    - by The DOCTOR from TARDIS
    I have set the crontab like this: */5 0 * * * /www/permitChat.sh and the /www/permitChat.sh is this: # We are setting the name of file # in the variable along with complete path. sFilePath=`date +\/www\/ChatLogs\/%Y\/%m/%d_%m_%Y.txt` # First we set its permissions to # readable by all users, and then # modify them to be writable by only root. chmod a=r $sFilePath chmod u+w $sFilePath ls -lh $sFilePath The trouble I am facing is, the cron gets executed after 12:00 PM everyday, instead of executing at 12:00 AM to 01:00 AM, every 5 minutes. What could be wrong? All my system variables appear to be synced.

    Read the article

  • Excel table column validation next row

    - by Kamlesh Doctor
    I made a table with first column formatted to DATE. In the first row I entered the date manually. In SECOND column I entered validation of date = previous date. I copied this table 8 times. In 5 tables when row is added the validation also appears in the next cell, but in 3 tables it does not. How can I correct this? I tried making a similar new table but the validation condition does not appear in the new row. Please reply.

    Read the article

  • Relational algebra help?!

    - by Tom
    im new to relational algebra and finding it difficult. Ive answered a few questions, however they where relatively simple. Could do with help with these though. Database Patient (PatientCode, PatientSurname, PatientFirstname, PatientSex, PatientAge, PatientOccupation, PatientHeight, PatientWeight, PatientAddress) Doctor (DoctorCode, DoctorSurName, DoctorFirstName, DoctorPrivateAddress, MobileNo, Doctor Specilisim) Operation (Operation Code, PatientCode, DoctorCode, Date, Time, Result, OperationType) Is_Seen_By (PatientCode, DoctorCode, Date, Time). Q1. Find the surname and gender of the patients that have been operated on by doctor "DR333" and results have not been successful. Q2. Find the code of the operations that have been done on the 18th of November 2010 and have been successful, please also list the name of the doctors which were involved with the operation.

    Read the article

  • Deploy and Run application at beginning of WIX Install

    - by Doctor Fro
    I'm trying to deploy and run an application (C# console app) at the beginning of the MSI install with WIX but having some difficulty. The application needs to run before any of the webserver actions happen but after the files have been copied from the MSI to the target location. I can get the app to run but only if I have actually copied the application in the directory before I run the MSI. If I don't do that, I get an error relating to the app not existing in the MSI logs. So basically I think it has to do with the launch sequence I am using I need to ensure that the app exists before it is run. Wondering if one of you good folks could help me out. The requirement is that the application must run as the first thing the WIX MSI does, (well actually before any of the webservice parts happen). The relevant bits of the Wix are as follows. <CustomAction Id='LaunchUpdaterRunFirst' FileKey='serverUpdaterRunFirstExe' ExeCommand='' Return='ignore' /> ... <InstallExecuteSequence> <Custom Action='CA_BlockOlderVersionInstall' After='FindRelatedProducts'>NEWERVERSIONDETECTED</Custom> <RemoveExistingProducts After="InstallInitialize" /> <Custom Action='LaunchUpdaterRunFirst' After='InstallInitialize' /> <Custom Action='LaunchInstaller' After='InstallFinalize'><![CDATA[ REMOVE <> "ALL" and UILevel <> 2]]></Custom> </InstallExecuteSequence> ... <Component Id="ServerInstaller" DiskId="1" Guid="9662EC72-1774-4d22-9F41-AD98A5DCD729"> <File Id="serverUpdaterRunFirstExe" Name="MyCompany.Server.Updater.RunFirst.exe" Source="$(var.SOURCEPATH)\MyCompany.Server.Updater.RunFirst.exe" /> <File Id="serverUpdaterRunFirstExeConfig" Name="MyCompany.Server.Updater.RunFirst.exe.config" Source="$(var.SOURCEPATH)\MyCompany.Server.Updater.RunFirst.exe.config" /> Any help or references greatly appreciated.

    Read the article

  • SQL HAVING COUNT and JOIN

    - by user1833274
    I have tried to this query: What are the doctors that work on less than 2 Hospitals. I have these tables: CREATE TABLE Hospital ( hid INT PRIMARY KEY, name VARCHAR(127) UNIQUE, country VARCHAR(127), area INT ); CREATE TABLE Doctor ( ic INT PRIMARY KEY, name VARCHAR(127), date_of_birth INT, ); CREATE TABLE Work ( hid INT, ic INT, since INT, FOREIGN KEY (hid) REFERENCES Hospital (hid), FOREIGN KEY (ic) REFERENCES Doctor (ic), PRIMARY KEY (hid,ic) ); I tried with this: SELECT DISTINCT D.ic FROM Doctor D, Work W JOIN Hospital H ON (H.hid = W.hid) WHERE D.bi = W.bi GROUP BY (D.ic) HAVING COUNT(H.hid) < 2 ;

    Read the article

  • What Problems Are Better Solved By SOAP Over REST?

    In the battle for web service supremacy SOAP and REST have been battling for years. In my personal opinion this debate should have never existed. Yes, both forms can be used to create an interactive web service, but each form of a service was developed independent of each other to solve two different yet similar problems. Based my research and experience I would have to say that REST should be the preferred web service methodology and SOAP should only be used in specific situations. Note, I did not say that I was against SOAP, and in fact I actually like to use SOAP when it is needed. Criteria for using SOAP: Does the service need a guaranteed level of reliability and security? Did the provider and consumer of the service agreed on a standardized data exchange format? Does the service need data context and state management? If you answer yes to any of these questions, then you may want to consider SOAP as the format for the web service. Another way to look at the relationship between REST and SOAP is to look at the medical field.  For most things a general doctor or you family health care provider can acceptably treat most conditions from the case of a common cold to a broken bone. A general doctor more aligns with REST in my opinion because for most service requirements REST fulfills a projects needs, but what happens if you need more of an advanced examination, you would go to a specialist. A specialist would already have experience dealing with specific issues that you are experiencing giving them specific context to how best treat you going forward. SOAP acts more like a specialist doctor giving that they understand the context of an issue and can treat it based on the state of other patients they have already treated. An example of where I would use SOAP over REST in real life would be a single sign-on application. I n these cases I need to check validate a username and password for authentication and authorization of a web page request. This service would need to maintain state while it authenticated a user and while it validated access to a web page on a subsequent request. This service must process every request for access and not allow caching to ensure that every request is processed and the appropriate users are allowed to view selected web pages. References: Rozlog, M. (2010). REST and SOAP: When Should I Use Each (or Both)? Retrieved 11 20, 2011, from Infoq.com: http://www.infoq.com/articles/rest-soap-when-to-use-each

    Read the article

  • Health problem of a programmer

    - by gunbuster363
    Hi all, I've been annoyed by this fingers ache for quite a long time, my fingers ache because of too much mouse clicking during office hour plus play games after work. I forget game for a while and my fingers are getting better, but still my right pointing finger would feel pressure when I click the mouse. I haven't go to a doctor because I afraid the fee would be high and he would just suggest me too get rest for the fingers, also, I don't know what kind of doctor should I go and see. My fingers get less pressure if I use my expensive deathadder ( what a shame, I bought this for gaming, but now I use it for rest ) at home because its buttons are softer, however I cannot have such expensive mouse at my office because I am afraid people would steal it. I use some trick when I am using the mouse such as single-click open a file, adding more shortcuts at desktop for common jobs, do you guys have some other tips for me? Thank you.

    Read the article

  • Serializing Python bytestrings to JSON, preserving ordinal character values

    - by Doctor J
    I have some binary data produced as base-256 bytestrings in Python (2.x). I need to read these into JavaScript, preserving the ordinal value of each byte (char) in the string. If you'll allow me to mix languages, I want to encode a string s in Python such that ord(s[i]) == s.charCodeAt(i) after I've read it back into JavaScript. The cleanest way to do this seems to be to serialize my Python strings to JSON. However, json.dump doesn't like my bytestrings, despite fiddling with the ensure_ascii and encoding parameters. Is there a way to encode bytestrings to Unicode strings that preserves ordinal character values? Otherwise I think I need to encode the characters above the ASCII range into JSON-style \u1234 escapes; but a codec like this does not seem to be among Python's codecs. Is there an easy way to serialize Python bytestrings to JSON, preserving char values, or do I need to write my own encoder?

    Read the article

  • What parallel programming model do you recommend today to take advantage of the manycore processors

    - by Doctor J
    If you were writing a new application from scratch today, and wanted it to scale to all the cores you could throw at it tomorrow, what parallel programming model/system/language/library would you choose? Why? I am particularly interested in answers along these axes: Programmer productivity / ease of use (can mortals successfully use it?) Target application domain (what problems is it (not) good at?) Concurrency style (does it support tasks, pipelines, data parallelism, messages...?) Maintainability / future-proofing (will anybody still be using it in 20 years?) Performance (how does it scale on what kinds of hardware?) I am being deliberately vauge on the nature of the application in anticipation of getting good general answers useful for a variety of applications.

    Read the article

  • SELECT subset from two tables and LEFT JOIN results

    - by Doctor Trout
    Hi all, I'm trying to write a bit of SQL for SQLITE that will take a subset from two tables (TableA and TableB) and then perform a LEFT JOIN. This is what I've tried, but this produces the wrong result: Select * from TableA Left Join TableB using(key) where TableA.key2 = "xxxx" AND TableB.key3 = "yyyy" This ignore cases where key2="xxxx" but key3 != "yyyy". I want all the rows from TableA that match my criteria whether or not their corresponding value in TableB matches, but only those rows from TableB that match both conditions. I did manage to solve this by using a VIEW, but I'm sure there must be a better way of doing this. It's just beginning to drive me insane tryng to solve it now. (Thanks for any help, hope I've explained this well enough).

    Read the article

  • How do I programmatically nullify a File Attachment in InfoPath Forms

    - by Doctor Zinda
    Howdy all, I'm running into a problem with some InfoPath C# code while trying to remove an attachment from a form. Basically the process is: User opens form User clicks button File attachment is cleared I've tried adding a blank attachment to my schema that never becomes populated, then setting the original field's value equal to that value by the method below. When debugging the form I catch an error: Schema validation found non-data type errors. Any tips here would be appreciated. public void BTN_ClearAttachment_Clicked(object sender, ClickedEventArgs e) { try { _OriginalAttachment.SetValue(_BLANK_ATTACHMENT.Value); } catch (Exception ex) { _ErrorField.SetValue(ex.Message + " : " + ex.StackTrace); } } Thanks, Dr Z Edit - P.S. I should clear up that both _OriginalAttachment & _ErrorField are both XPathNavigators, pointing at different schema elements. I've verified that these XPathNavigators are both pointing at valid schema elements.

    Read the article

  • Which is the best API/Library to use when accessing a WebCam in .Net?

    - by Doctor Jones
    Which is the best API to use when accessing a WebCam in .Net? (I know they can be webcam specific, I am willing to buy a new webcam if it means better results). I want to write a desktop application that will take video from a webcam and store it in MPEG4 formats (DivX, Xvid, etc...). I would also like to access bitmap stills from the device so I can do image comparison between frames. I have tried various libraries, and none have really been a great fit (some have performance issues (very inconsistent framerates), some have image quality limitations, some just crash out for seemingly no reason. I want to get high quality video (as high as I can get) and a decent framerate. My webcam is more than up to the job and I was hoping that there would be a nice Managed .Net library around that would help my cause. Are webcam APIs all just incredibly bad?

    Read the article

  • SQL code to display counts() of value retrieved from another column

    - by Doctor Trout
    I have three tables (these are the relevant columns): Table1 bookingid, person, role Table2 bookingid, projectid Table3 projectid, project, numberofrole1, numberofrole2 Table1.role can take two values: "role1" or "role2". What I want to do is to show which projects don't have the correct number of roles in Table1. The number of roles there there should be for each role is in Table3. For example, if Table1 contains these three rows: bookingid, person, role 7, Tim, role1 7, Bob, role1, 7, Charles, role2 and Table2 bookingid, projectid 7, 1 and Table3 projectid, project, numberofrole1, numberofrole2 1, Test1, 2, 2 I would like the results to show that there are not the correct number of role2s for project Test1. To be honest, something like this is a bit beyond my ability, so I'm open to suggestions on the best way to do this. I'm using sqlite and php (it's only a small project). I suppose I could do something with the php at the end once I've got my results, but I wondered if there was a better way to do it with sqlite. I started by doing something like this: SELECT project, COUNT(numberofrole1) as "Role" FROM Table1 JOIN Table2 USING (projectid) JOIN Table3 USING (bookingid) WHERE role="role1" GROUP BY project But I can't work out how to compare the value returned as "Role" with the value got from numberofrole1 Any help is gratefully received.

    Read the article

  • PHP timeslot booking*

    - by boyee007
    regarding of this question.. PHP Booking timeslot I tried 'GROUP BY' id_timeslot still didnt work, as its only showing the booked timeslot not available i tried that solution, but give me an error and not quite understand how to use 'coelence' table timeslot (id_timeslot integer); table doctor (id_doctor integer); table bookslot (id_bookslot, id_doctor, id_timeslot integer); insert into doctor (id_doctor) values (1 = doc_A), (2 = doc_B), (3 = doc_C); insert into TimeSlot (id_timeslot) values (1 = 10:00:00), (2 = 10:15:00), (3 = 10:30:00), (4 = 10:45:00); insert into bookslot (id_doctor,id_timeslot) values (1,1), (1,5), (2,1), (2,4), (3,1); Join mysql table $q = $mysqli->query("SELECT * FROM bookslot RIGHT JOIN timeslot ON bookslot.id_timeslot = timeslot.id_timeslot LEFT JOIN doctor ON bookslot.id_doctor = doctor.id_doctor "); echoing result and checking if it matches todays date or else set available while($r = $q->fetch_array(MYSQLI_ASSOC)) : echo '<tr>'; echo '<td align="center">' . $r['times'] . '</td>'; if($r['booked_date'] == date('Y-m-d') && $r['id_doctor'] == 1): echo '<td><a href="#available" class="booked">booked</a></td>'; else : echo '<td><a href="#" class="available">available</a></td>'; endif; if($r['booked_date'] == date('Y-m-d') && $r['id_doctor'] == 2): echo '<td><a href="#available" class="booked">booked</a></td>'; else : echo '<td><a href="#" class="available">available</a></td>'; endif; if($r['booked_date'] == date('Y-m-d') && $r['id_doctor'] == 3): echo '<td><a href="#available" class="booked">booked</a></td>'; else : echo '<td><a href="#" class="available">available</a></td>'; endif; echo '</tr>'; endwhile; result from webpage and i want the result look like: id_timeslot doc_A doc_B doc_C ---------------------------------------------- 1 booked booked booked 2 available available available 3 available available available 4 available booked available 5 booked available available Any other solution please!

    Read the article

  • slot booking problem

    - by pradeep
    Hi, I am making a doctor appointment slot booking mechanism,where in doctor appointment slots will be divided into 30 mins slot each...i have achieved all the working code.. 1 problem i am facing is that..this booking is made at 2 places i.e 2 receptions..so when 1 selects a slot(radio button) not yet confirmed and saved in DB.other reception must not be able to select .how do i do it.any help on this...how do i go abt it.

    Read the article

  • How do I find the ruby interpreter?

    - by The Doctor What
    Inside a ruby script, how do I get the path to the ruby interpreter? Example script: #!/path/to/ruby puts `#{RUBY_INTERPRETER_PATH} -e "puts 'hi'"` #EOF Where RUBY_INTERPRETER_PATH is a mythical way of finding /path/to/ruby. This is just an example, though. I realize in this case that I could just copy /path/to/ruby into the script, but I don't want to do that. I want this to work "correctly" regardless of what the #! line says. Even if running under windows. Ciao!

    Read the article

  • Be the surgeon

    - by Rob Farley
    It’s a phrase I use often, especially when teaching, and I wish I had realised the concept years earlier. (And of course, fits with this month’s T-SQL Tuesday topic, hosted by Argenis Fernandez) When I’m sick enough to go to the doctor, I see a GP. I used to typically see the same guy, but he’s moved on now. However, when he has been able to roughly identify the area of the problem, I get referred to a specialist, sometimes a surgeon. Being a surgeon requires a refined set of skills. It’s why they often don’t like to be called “Doctor”, and prefer the traditional “Mister” (the history is that the doctor used to make the diagnosis, and then hand the patient over to the person who didn’t have a doctorate, but rather was an expert cutter, typically from a background in butchering). But if you ask the surgeon about the pain you have in your leg sometimes, you’ll get told to ask your GP. It’s not that your surgeon isn’t interested – they just don’t know the answer. IT is the same now. That wasn’t something that I really understood when I got out of university. I knew there was a lot to know about IT – I’d just done an honours degree in it. But I also knew that I’d done well in just about all my subjects, and felt like I had a handle on everything. I got into developing, and still felt that having a good level of understanding about every aspect of IT was a good thing. This got me through for the first six or seven years of my career. But then I started to realise that I couldn’t compete. I’d moved into management, and was spending my days running projects, rather than writing code. The kids were getting older. I’d had a bad back injury (ask anyone with chronic pain how it affects  your ability to concentrate, retain information, etc). But most of all, IT was getting larger. I knew kids without lives who knew more than I did. And I felt like I could easily identify people who were better than me in whatever area I could think of. Except writing queries (this was before I discovered technical communities, and people like Paul White and Dave Ballantyne). And so I figured I’d specialise. I wish I’d done it years earlier. Now, I can tell you plenty of people who are better than me at any area you can pick. But there are also more people who might consider listing me in some of their lists too. If I’d stayed the GP, I’d be stuck in management, and finding that there were better managers than me too. If you’re reading this, SQL could well be your thing. But it might not be either. Your thing might not even be in IT. Find out, and then see if you can be a world-beater at it. But it gets even better, because you can find other people to complement the things that you’re not so good at. My company, LobsterPot Solutions, has six people in it at the moment. I’ve hand-picked those six people, along with the one who quit. The great thing about it is that I’ve been able to pick people who don’t necessarily specialise in the same way as me. I don’t write their T-SQL for them – generally they’re good enough at that themselves. But I’m on-hand if needed. Consider Roger Noble, for example. He’s doing stuff in HTML5 and jQuery that I could never dream of doing to create an amazing HTML5 version of PivotViewer. Or Ashley Sewell, a guy who does project management far better than I do. I could go on. My team is brilliant, and I love them to bits. We’re all surgeons, and when we work together, I like to think we’re pretty good! @rob_farley

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >