I created a search function. It can get the address from the whole lesson, but how can I create query search from parts of the address? For example, the complete address is Paya lebar Road Blk27 , how can I do this so that the user can simply type in paya and it will still be visible? SearchForm & lt; H2 & gt; See Patient Records & lt; / H2 & gt; & Lt; Body & gt; & Lt; Form action = "display_patient.php" method = "post" & gt; & Lt; P & gt; Choose: & lt; Select name = "patient_war" & gt; & Lt ;? Php $ value = array (see_now, name, address); Forex Currency ($ value $ option) {echo '& lt; Option value = "'. $ Option.' '' (Issued ($ _ POST ['Patient' '']) and $ _POST ['Patient' '] == $ Option?' Selected ':' ''). ' & Gt; ' . $ Option '& lt; / option & gt;';}? & Gt; & lt; / select & gt; & lt; input type = "text" name = "typed" value = "" /> ; & Lt; Input Type = "submit" value = "submit" /> <<> & lt ;? php if (Isset ($ _ POST ['disease_use'])) {$ type = $ _POST ['typed']; select $ $ = $ _POST ['patient' '']; if ($ Select == 'View_all' ) {Resonant "& lt; Table range = '1' & gt; "echo" & lt; Tr & gt; \ N "; echo" & lt; Th> id & lt; / Th & gt; \ N "; echo" & lt; Th & gt; Patient's name & lt; / Th & gt; \ N "; echo" & lt; Th & gt; Age & lt; / Th & gt; \ N "; echo" & lt; Th & gt; NRIC & lt; / Th & gt; \ N "; echo" & lt; Th & gt; Date of birth & lt; / Th & gt; \ N "; echo" & lt; Th & gt; Medical allergy & lt; / Th & gt; \ N "; echo" & lt; Th & gt; Medical History & lt; / Th & gt; \ N "; echo" & lt; Th & gt; Phone & lt; / Th & gt; \ N "; echo" & lt; Th & gt; Address & lt; / Th & gt; \ N "; echo & quot; and & gt; doctor assigned & lt; / th & gt; \ n"; Echo "& lt; / tr & gt;"; $ Pat_set = default_impressions (); While ($ mo = mysqli_fetch_array ($ pat_set)) {echo "<<"; Echo "& lt; td & gt;" . $ Mo ['id'] "& lt; / td & gt;"; Echo "& lt; td & gt;" $ Mo ['name'] "& lt; / td & gt;"; Echo "& lt; td & gt;" $ Mo ['age'] "& lt; / td & gt;"; Echo "& lt; td & gt;" $ Mo ['enric'] "& lt; / td & gt;"; Echo "& lt; td & gt;" $ Mo ['birthday'] "& lt; / td & gt;"; Echo "& lt; td & gt;" $ Mo ['medical_alleries'] "& lt; / td & gt;"; Echo "& lt; td & gt;" $ Mo ['medical_history'] "& lt; / td & gt;"; Echo "& lt; td & gt;" $ Mo ['phone'] "& lt; / td & gt;"; Echo "& lt; td & gt;" $ Mo ['address']. "& Lt; / td>"; Echo "& lt; td & gt;" $ Mo ['doctor_said'] "& lt; / td & gt;"; Echo "& lt; / tr & gt;"; }} Else {echo "and lieutenant table = '1' & gt; \ n"; Echo "& lt; tr & gt; \ n"; Echo "& lt; th> id \ n"; Echo "& lt; th & gt; Patient's name & lt; / th & gt; \ n"; Echo " Age \ n"; Echo "& lt; th & gt; NRIC & lt; / th & gt; \ n"; Echo " gt; date of birth & lt; / th & gt; \ n"; Echo "& lt; th & gt; Medical allergy & lt; / th & gt; \ n"; Echo "& lt; th & gt; Medical History & lt; / th & gt; \ n"; Echo "& lt; th> phone & lt; / th & gt; \ n"; Echo "& lt; th & gt; Address & lt; / th & gt; \ n"; Echo & quot; By & gt; The doctor was assigned & lt; / Th & gt; \ N "; echo" & lt; / Tr & gt; "; $ Patients_set = find_patients ($ choose, $ type); while ($ row = mysqli_fetch_array ($ patient_set)) {echo" "$ line ['name']" & lt; / TD & gt; "; echo" & lt; Td> "$ line ['age']" & lt; / TD & gt; "; echo" & lt; Td> "$ line ['encryic']" & lt; / TD & gt; "; echo" & lt; Td> "$ line ['birthday']" & lt; / TD & gt; "; echo" & lt; Td> "$ line ['medical_allergies']" & lt; / TD & gt; "; echo" & lt; Td> "$ line ['medical_history']" & lt; / TD & gt; "; echo" & lt; Td> "$ line ['phone']" & lt; / TD & gt; "; echo" & lt; Td> "$ line ['address']." & Lt; / Td> "; echo" & lt; Td> "$ line [doctor-specific ']" & lt; / TD & gt; "; echo" & lt; Post-text "itemprop =" text "> To search in MySQL, whether a column specific string is used example SELECT * to the table WHERE Just like it in the column '% somestring%'; Just try it in your case $ typed = $ _POST ['typed']; and do a MySQL query like this $ query = "Select * From the table where address '%". $ Typed. "%'"; < / Code>
Popular posts from this blog
I have a little code here. Could you please tell me what this code really does? please. Here in the AJAX call: $ .ajax ({url: "{% url} upload_document '%}", type: "POST", data : {Csrfmiddletoken: document.getElementsByName ('csrfmiddletoken') [0] Price, Title: document.getElementById ('title'). Value, // document: document: document.getElementById ('document'),}, datatype: "Jason", success: function (feedback) {if (feedback == "true") {// success} other {// attachment errors}}}); How AJAX works in the Django and how we can see the AJAX request. Here is the idea of my thoughts def upload_document (requested): Print request. POTT print request FILES if request.is_ajax (): If request.method == 'POST': form = UploadForm (request.POST, request.FILES, user = request.user) if form.is_valid (): Form.save () return HTTPPCS (SimpleJason Dumps ('True'), Mime Type = 'App / Jason') Other:...
I have 31 topics (S1, S2, S3, S4, etc.) 3 images in each topic, opposite 1 IMG, Contrast 2 IMG and Contrast 3 Are IMG I p In a NX1 cell named P, I would like to use a loop to get all the paths of contrasts from all the subjects: data / S1 / contrast1.img / S1 / contrast2.img data / S1 / contrast3.img data / s2 / contrast1.img data / S2 / contrast2.img Data / S2 / contrast3.img ... Data / S31 / contast3.img This is what I've tried: A = {'S1', 'S2', 'S3', ..., 'S31'}; % All topics C = {'contrast1.img', 'contrast2.img', 'contrast3.img'}; For each = P = cell (31 * 3,1) for each topic, the required contrast images: Length = A for Jammu = 1: Length (C) P {j} = spm_select ('FPList', Fullfile (data_path, q {i}) sprint ('% s', cell2mat (c))); % Of each topic is to select three contrast images, it works in my script, it is probably not 100% correct, because I had to simplify this example. End of ...
I am constantly trying to use recurrent neural networks to classify a series of data. To be more specific, I have a sequence of sensor reading (which is continuous over time), I have to learn an algorithm which can detect the state related to this pattern, given the readings change. Example: Time step_1: 1.4 Time step_2: 1 Time step_3: 0.8 State = New Sequence: Time Phase 1: 0.4 Time Phase 2: 0.3 Time Phase 3: 0.1 State = Sitting I actually have 12 censors, I'm just showing a sequence of numbers for convenience. (Numbers are not real, I'm just trying to fulfill this idea)! I am trying to make my network with PyBrain RNN, however, I can not get a Data Set Container that can detect it, like information I tried to use sequential data But after some testing I came to know that this number is the next element in the sequence of numbers. Here's how I prepare my dataset: self.alldata = SequentialDataSet (ds.num_features, 1) # Now add samples to the dat...
|
Comments
Post a Comment