Jump to content

frobak

Members
  • Posts

    96
  • Joined

  • Last visited

Posts posted by frobak

  1. in my stupidity, i neglegted to try it in different browsers. It works in chrome and safari, but i was trying it firefox, and even more stupidly I didnt look at the errors.

     

    As its over ssl, im having issues linking to offsite js files that are hosted over http. I'm getting mixed content errors.

     

    I'll try hosting all the files and see if that works.

     

    Appreciate your help

  2. Hi .Josh

     

    Yes its very strange.

     

    If i visit stream.php the video plays.

     

    I am now not using the below, as I was trying to just echo the URL within the player code, but as its outside the root, i cant access it like that:

    $file_stream_url = "../users/$u_id/$folder_name/$file_name";
    

    For now I have hard coded the path into stream.php just to try and get it working, hard coded path below:

    $path='/home/[account_name]/users/100002/Testage/marine.mp4';
    
    

    And i have also tried

    $path='../users/100002/Testage/marine.mp4';
    

    they both stream the video fine if you visit stream.php, but doesnt work when i try to access it via:

    echo <<<EOT
    <div id="video_box">
    <video id="example_video_1" class="video-js vjs-default-skin"
    controls preload="auto" width="500" height="350"
    poster="images/img_splash.png"
    data-setup='{"example_option":true}'>
    <source src='https://url_to_file/stream.php' type='$file_type' />
    </video>
    </div>	
    <div id='video_details'>
    <div id='video_details_text'>
    <h2>Download this video</h2>
    <p>To download this video, click the download button.<br /><br />Depending on the format of the file, you may need to download the player <a href=''>here</a></p>
    </div>
    <div id="video_details_dl">
    <form method='POST' action='functions.php'>
    <input type='hidden' id='download_url' name='download_url' value='$file_url'>
    <input type='hidden' id='download_type' name='download_type' value='$file_type'>
    <input type='submit' class='file_download_button clickable' name='submit' value='Download'>
    </form>
    </div>
    </div>
    EOT;
    
  3. I tried using readfile, this is my player:

    <div id='video_box'>
    	<video id='example_video_1' class='video-js vjs-default-skin'
    		controls preload='auto' width='500' height='350'
    		poster='images/img_name.png'
    		data-setup='{'example_option':true}'>
    		<source src='https://url_to_file/stream.php' type='video/mp4' />
    	</video>
    </div>	
    
    

    and the content of the file https://url_to_file/stream.php:

    <?php 
    $path='../users/100002/Testage/marine.mp4';
    header('Content-type: video/mp4');    
    header('Content-Length: '.filesize($path)); // provide file size    
    readfile($path);
    ?>
    

    but it doesnt do anything, the player says "No video with supported format and MIME type found" and when i look at the source it is just printing the url https://url_to_file/stream.php.

     

    If i visit the url above, it streams the video, but obviously not in the player

     

    Am i missing something simple?

  4. ok thank for your reply. Currently I am using video.js (html5 player) to stream the files. Which worked when the files were within the root, but since ive moved them out, it doesnt work.

     

    The file url is held in a var :

    $file_stream_url = "../users/$u_id/$folder_name/$file_name";
    

    and the code to stream:

    <div id="video_box">
    <video id="example_video_1" class="video-js vjs-default-skin"
    controls preload="auto" width="500" height="350"
    poster="images/img_name.png"
    data-setup='{"example_option":true}'>
    <source src="$file_stream_url" type='$file_type' />
    </video>
    </div>	
    

    Is it possible to use this script, or do i need to rewrite?

  5. Hi, before i get burried in trying to create the code, I was hoping to get some advice before moving forward.

     

    I am creating a video sharing app for a client.

     

    The videos are highly confidential, so i want to store them outside the root and stream them when a user enters a link into a browser.

     

    Is this possible?

     

    I can seem to find any info on any forums or Google.

     

    Can I stream it direct to the browser?

     

    Many thanks

    Alan

  6. Well i finally figured it out.

     

    I took what you said and explored the xml because it was working when we put static xml in the variable. And after many hours of debugging i finally realised that the xml response i posted above, the tag name of the xml element was actually 'PartNumber' not 'partnumber'. I copied the above from firebug, which stupidly makes everything lower case.

     

    So i just changed the regex to:

     

    $regex[] = '/.*?<PartNumber>/s';
    

     

    Thanks MMDE for your patience and help on this, otherwise i'd still be in the dark.

     

    peace out

  7. Yes i only need the part number

     

    thanks but that doesnt return anything?!

     

    $result = curl_exec($ch);
    
    $xml = $result;
    
    $regex[] = '/.*?<partnumber>/s';
    $regex[] = '/<.*/s';
    
    echo preg_replace($regex, '', $xml);
    

     

     

    var_dump($regex);

    array(2) { [0]=> string(18) "/.*?/s" [1]=> string(6) "/<.*/s" }
    

     

     

    also tried this:  $part_no = preg_replace($regex, '', $xml);

     

    var_dump($part_no);

    string(0) "" 
    

     

     

  8. yeah that doesnt work, the $part variable hasnt got anything in it, as below.

     

    $dom = new DomDocument("1.0", "ISO-8859-1");
    $dom->loadXML($result);
    
    $part = $dom->getElementsByTagName('partnumber')->item(0)->value;
    

     

    But i know that the xml that i have listed above is in $result

     

    So why is so difficult to get to that element in the xml?

  9. Hi

     

    Im trying to get the contents of a domdocument element. I need to get to the 'partnumber' of the below xml response from the soap request. can you tell me if this object has some values in it?

     

    object(DOMNodeList)#3 (1) { ["length"]=> int(0) } 

     

    This is the xml

     

    <soap:envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:body>
    <vehicle_getvehicleandcomponentpartsresponse xmlns="http://tempuri.org/">
    <vehicle_getvehicleandcomponentpartsresult>
    <xs:schema id="NewDataSet" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="">
    <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <newdataset xmlns="">
    <stddata msdata:roworder="0" diffgr:id="StdData1">
    <make>CITROEN </make>
    <model>C3 SX </model>
    <cc>01360</cc>
    <vin>blah</vin>
    <engine_number>blah</engine_number>
    <reg_date>29-SEP-2002</reg_date>
    <manuf_date>29-SEP-2002</manuf_date>
    <colour>BLUE</colour>
    <fuel>PETROL</fuel>
    5 DOOR HATCHBACK
    <co2>148</co2>
    <vehicle_gross_weight>0000000</vehicle_gross_weight>
    <imported>0</imported>
    <imported_date>01-JAN-0001</imported_date>
    <scrapped_date>01-JAN-0001</scrapped_date>
    <scrapped>0</scrapped>
    <unscrapped>0</unscrapped>
    <vehicle_max_tech_mass>00000</vehicle_max_tech_mass>
    <vehicle_max_power>000</vehicle_max_power>
    <vehicle_mass>000001080</vehicle_mass>
    <vehicle_seats>000</vehicle_seats>
    <wheelplan_desc>2 AXLE RIGID BODY</wheelplan_desc>
    <dvla_engine_code>KFV</dvla_engine_code>
    <vin_build_year>N/A</vin_build_year>
    <vin_build_month>N/A</vin_build_month>
    </stddata>
    <enhanceddata msdata:roworder="0" diffgr:id="EnhancedData1">
    <fldmanlname>Citroen</fldmanlname>
    <fldmodlname>C3</fldmodlname>
    <fldmodverno>1A (4/2002 - 9/2005)</fldmodverno>
    <fldmanvercode>FC</fldmanvercode>
    <fldderlname>SX</fldderlname>
    <fldderverno>1A (4/2002 - 9/2005)</fldderverno>
    <fldspecdes>
    <fldstrgposlname>Right Hand Drive</fldstrgposlname>
    <fldstrgpossname>RHD</fldstrgpossname>
    <fldbstlname>Hatchback</fldbstlname>
    <fldbstsname>Hat</fldbstsname>
    <flddoocountlname>5 Doors</flddoocountlname>
    <flddoocountsname>5 drs</flddoocountsname>
    <fldseacountlname>5 Seats</fldseacountlname>
    <fldseacountsname>5 Seats</fldseacountsname>
    <flddrivetypelname>Front</flddrivetypelname>
    <flddrivetypesname>FWD</flddrivetypesname>
    <fldtratypelname>Manual</fldtratypelname>
    <fldtratypesname>Man</fldtratypesname>
    <fldgeacountlname>5 Gears</fldgeacountlname>
    <fldgeacountsname>5 gr</fldgeacountsname>
    <fldengsizelname>1.4 litres</fldengsizelname>
    <fldexactcc>1360</fldexactcc>
    <fldfuelname>Petrol</fldfuelname>
    <fldfuesname>Pet</fldfuesname>
    <fldfudlname>Injection</fldfudlname>
    <fldfudsname>Inj</fldfudsname>
    <fldvalcountlname>8 Valves</fldvalcountlname>
    <fldvalcountsname>8V</fldvalcountsname>
    <fldbhp>75</fldbhp>
    <fldkw>55</fldkw>
    <fldenginecode>KFV</fldenginecode>
    <fldgearboxcode>
    <fldcylcountlname>4 Cylinders</fldcylcountlname>
    <fldcylcountsname>4 Cyl</fldcylcountsname>
    <fldcamshaftlname>SOHC</fldcamshaftlname>
    <fldengalignlname>Transverse</fldengalignlname>
    <fldengalignsname>Trans</fldengalignsname>
    <fldcylconfigurationlname>Inline</fldcylconfigurationlname>
    <fldcylconfigurationsname>Inline</fldcylconfigurationsname>
    <fldengposlname>Front</fldengposlname>
    <fldengpossname>Frt</fldengpossname>
    <fldaxllname>4x2</fldaxllname>
    <fldaxlsname>4x2</fldaxlsname>
    <fldwheelbaselname>2460mm</fldwheelbaselname>
    <fldweilname>1470kg</fldweilname>
    <fldspec2des>
    <fldvehtypedes>Car</fldvehtypedes>
    <fldmfrcolour>Mauritius Blue,Oriental Blue,Tuscan Blue</fldmfrcolour>
    <fldspec2id>1226</fldspec2id>
    </fldspec2des>
    </fldgearboxcode>
    </fldspecdes>
    </enhanceddata>
    <parts msdata:roworder="0" diffgr:id="Parts1">
    <imagepath>http://topcat.adsapplications.co.uk/ImageStore/no_image.png</imagepath>
    <supplierid>1992</supplierid>
    <supplier>UK Reference</supplier>
    <partnumber>202</partnumber>
    

     

    and this is the php code im trying

    $dom = new DomDocument("1.0", "ISO-8859-1");
    $dom->loadXML($result);
    $xpath = new DomXPath($dom);
    
            $queryResult = $xpath->query('/parts[@id="Parts1"]/partnumber');
    
    
      $node = $queryResult->item(0);
      echo "{$node->nodeName} - {$node->nodeValue}";
    

     

    SO if there is somethign in the object, how would i get to it? or id the object empty?

     

    What do you think?

  10. Hi, i'm trying to access parts of this soap response xml, but I just cant get it. I dont understand the diffgram bit for a start. And do i need to think about the soap and  vehicle_getvehicleandcomponentpartsresponse namespaces?

     

    I need the partnumber!

     

    Heres the xml

    <soap:envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:body>
    <vehicle_getvehicleandcomponentpartsresponse xmlns="http://tempuri.org/">
    <vehicle_getvehicleandcomponentpartsresult>
    <xs:schema id="NewDataSet" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="">
    <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <newdataset xmlns="">
    <stddata msdata:roworder="0" diffgr:id="StdData1">
    <enhanceddata msdata:roworder="0" diffgr:id="EnhancedData1">
    <parts msdata:roworder="0" diffgr:id="Parts1">
    <imagepath>http://topcat.adsapplications.co.uk/ImageStore/no_image.png</imagepath>
    <supplierid>1992</supplierid>
    <supplier>UK Reference</supplier>
    <partnumber>202</partnumber>
    

     

    I'm using curl, and the php code im trying:

    $result = curl_exec($ch);
    $enhanced_data = new SimpleXMLElement($result);
    $bat_part = $enhanced_data->children('diffgr', true)->children()->NewDataSet->Parts->partumber;
    

     

    I know this is wrong, but i have accessed similar data from a similar service, the only difference is the below soap response:

    <soap:envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:body>
    <vehicle_getvehicleandcomponentpartsresponse xmlns="http://tempuri.org/">
    <vehicle_getvehicleandcomponentpartsresult>
    

     

    Surely this shouldnt be so difficult, am i doing somethign completely wrong?

  11. Hi

     

    I am tryign to connect to a web service through curl. I need to send a soap header with user/pass details, and then send the request with a further var and user/pass.

     

    I've been mucking around with this for ages now and need some help if possible.

     

    Im getting error "Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Start tag expected, '<' not found"

    I assume because its not returning xml, but even when i try to just print the respose without using simpleXMLelement i get an error about data is invalid.

     

    The code should return xml

     

    This is the code i have:

     

    // capture vehicle registration from main script
    $vehicle_reg = $_POST['add_vehicle_reg'];
    
    // convert reg to uppercase, remove spaces
    $vehicle_reg = strtoupper($vehicle_reg);
    $vehicle_reg = str_replace(' ', '', $vehicle_reg);
    
    define('NEWLINE', "<br />\n");
    
    $ch = curl_init();
    
    $data = '<?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header>
        <ServiceAuthHeader xmlns="http://example.com/">
          <Username>username</Username>
          <Password>password</Password>
        </ServiceAuthHeader>
      </soap:Header>
      <soap:Body>
        <Vehicle_GetVehicleAndComponentParts xmlns="http://hosturl.com">
          <vrm>' . $vehicle_reg . '</vrm>
          <userName>username</userName>
          <encryptedPassword>password</encryptedPassword>
        </Vehicle_GetVehicleAndComponentParts>
      </soap:Body>
    </soap:Envelope>';
    
    curl_setopt($ch, CURLOPT_URL, 'http://www.example.com');
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    //curl_setopt($ch, CURLOPT_VERBOSE, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    
    
    // EXECUTE 1st REQUEST
    $postresponse = curl_exec ($ch);
    $veh_make = new SimpleXMLElement($postresponse);
    
    curl_close($ch);
    

     

    Am i like, miles away. Should i go back to school?

  12. Hey

     

    Right, have this issue with accessing simpleXML elements, i'm sure it should work, but i cant seem to get it.

     

    This is the xml data. I need the model and make:

    <diffgr:diffgram>
    <NewDataSet>
    <StdData diffgr:id="StdData1" msdata:rowOrder="0">
    <MAKE>CITROEN</MAKE>
    <MODEL>C3 SX</MODEL>
    

     

    here is the php ive got:

    $xml->children("diffgr", true)->diffgram->children("")->NewDataSet->StdData->MAKE;

     

    Can you see where im going wrong?

     

    cheers

  13. Hi, having some issues getting to the values of an xml document using simplexmlelement

     

    Basically, whatever i do, i cant seem to get the values

     

    heres the xml data

      <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
        <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="StdData">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="MAKE" type="xs:string" minOccurs="0" />
                    <xs:element name="MODEL" type="xs:string" minOccurs="0" />
                    <xs:element name="CC" type="xs:string" minOccurs="0" />
                    <xs:element name="VIN" type="xs:string" minOccurs="0" />
                    <xs:element name="ENGINE_NUMBER" type="xs:string" minOccurs="0" />
                    <xs:element name="REG_DATE" type="xs:string" minOccurs="0" />
                    <xs:element name="MANUF_DATE" type="xs:string" minOccurs="0" />
                    <xs:element name="COLOUR" type="xs:string" minOccurs="0" />
                    <xs:element name="VEHICLE_MASS" type="xs:string" minOccurs="0" />
                    <xs:element name="VEHICLE_SEATS" type="xs:string" minOccurs="0" />
                    <xs:element name="VEHICLE_V5c_DATE" type="xs:string" minOccurs="0" />
                    <xs:element name="VEHICLE_NOISE_STATIONARY" type="xs:string" minOccurs="0" />
                    <xs:element name="VEHICLE_NOISE_DRIVE_BY" type="xs:string" minOccurs="0" />
                    <xs:element name="VEHICLE_NOISE_ENGINE" type="xs:string" minOccurs="0" />
                    <xs:element name="WHEELPLAN_DESC" type="xs:string" minOccurs="0" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="EnhancedData">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="fldmanLName" type="xs:string" minOccurs="0" />
                    <xs:element name="fldmodLName" type="xs:string" minOccurs="0" />
                    <xs:element name="fldmodverNo" type="xs:string" minOccurs="0" />
                    <xs:element name="fldderLName" type="xs:string" minOccurs="0" />
                    <xs:element name="fldderverno" type="xs:string" minOccurs="0" />
                    <xs:element name="fldbstLName" type="xs:string" minOccurs="0" />
                    <xs:element name="flddooCountLName" type="xs:string" minOccurs="0" />
                    <xs:element name="fldgeacountLname" type="xs:string" minOccurs="0" />
                    <xs:element name="fldtratypeLname" type="xs:string" minOccurs="0" />
                    <xs:element name="fldEngineCode" type="xs:string" minOccurs="0" />
                    <xs:element name="fldGearboxCode" type="xs:string" minOccurs="0" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>
      </xs:schema>
      <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
        <NewDataSet xmlns="">
          <StdData diffgr:id="StdData1" msdata:rowOrder="0">
            <MAKE>CITROEN             </MAKE>
            <MODEL>C3 SX  
    

     

    Basically, i need to get the make and model of the car, which is showing just above.

     

    heres the php

     

    // INIT CURL
    $ch = curl_init();
    
    // SET URL FOR THE POST FORM LOGIN
    curl_setopt($ch, CURLOPT_URL, '');
    
    // ENABLE HTTP POST
    curl_setopt ($ch, CURLOPT_POST, 1);
    
    // SET POST PARAMETERS : FORM VALUES FOR EACH FIELD
    curl_setopt ($ch, CURLOPT_POSTFIELDS, '');
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    
    // EXECUTE 1st REQUEST (LOGIN)
    $postresponse = curl_exec ($ch);
    echo $postresponse;
    
    // SET FILE TO DOWNLOAD
    curl_setopt($ch, CURLOPT_URL, '');
    
    // EXECUTE 2nd REQUEST (xml response)
    $getresponse = curl_exec ($ch);
    $xml = new SimpleXMLElement($getresponse);
    echo $xml->diffgram->MAKE;
    
    // CLOSE THE SESSION
    curl_close($ch);
    

     

    ive been trying for a coupel of days now, need some help. how can i access those xml elements only? any ideas

     

    cheers

  14. This is what i have?!?!!?

     

    $sql3 = "SELECT candidate_details.username FROM vacancy_details, candidate_details WHERE vacancy_details.vacancy_id = '$_POST[vacancy_id]' AND
    (vacancy_details.acca=candidate_details.acca OR 
    vacancy_details.msc_bp_mgmt=candidate_details.msc_bp_mgmt OR
    vacancy_details.ManualCalculations=candidate_details.ManualCalculations OR
    vacancy_details.PayrollImplementation=candidate_details.PayrollImplementation OR
    vacancy_details.WorkingTimeRegulations=candidate_details.WorkingTimeRegulations OR
    vacancy_details.Companycarsandvans=candidate_details.Companycarsandvans OR
    vacancy_details.PensionAdministration=candidate_details.PensionAdministration OR
    vacancy_details.InsolvencyandclosingdownaPAYEscheme=candidate_details.InsolvencyandclosingdownaPAYEscheme OR
    vacancy_details.ADPSurepay=candidate_details.ADPSurepay OR
    vacancy_details.Moorepay=candidate_details.Moorepay OR
    vacancy_details.SunAccounting=candidate_details.SunAccounting OR
    vacancy_details.SageKCS=candidate_details.SageKCS OR
    vacancy_details.ADPStreamline=candidate_details.ADPStreamline OR
    vacancy_details.MidlandDelphi=candidate_details.MidlandDelphi OR
    vacancy_details.Star=candidate_details.Star OR
    vacancy_details.OpenDoor=candidate_details.OpenDoor OR
    vacancy_details.Tempaid=candidate_details.Tempaid OR
    vacancy_details.ADPFreedom=candidate_details.ADPFreedom OR
    vacancy_details.ADPGlobalview=candidate_details.ADPGlobalview OR
    vacancy_details.Payrite=candidate_details.Payrite OR
    vacancy_details.Tempest=candidate_details.Tempest OR
    vacancy_details.Agresso=candidate_details.Agresso OR
    vacancy_details.CeridianSource=candidate_details.CeridianSource OR
    vacancy_details.Peoplesoft=candidate_details.Peoplesoft OR
    vacancy_details.Trent=candidate_details.Trent OR
    vacancy_details.Chris21=candidate_details.Chris21 OR
    vacancy_details.PSEnterprise=candidate_details.PSEnterprise OR
    vacancy_details.Unipay54=candidate_details.Unipay54 OR
    vacancy_details.Excel=candidate_details.Excel OR
    vacancy_details.Resourcelink=candidate_details.Resourcelink OR
    vacancy_details.Oracle=candidate_details.Oracle OR
    vacancy_details.Inhouse=candidate_details.Inhouse OR
    vacancy_details.Sage=candidate_details.Sage OR
    vacancy_details.PS2000=candidate_details.PS2000 OR
    vacancy_details.Cintra=candidate_details.Cintra OR
    vacancy_details.PegasusOpera=candidate_details.PegasusOpera OR
    vacancy_details.Intex=candidate_details.Intex OR
    vacancy_details.iTrent=candidate_details.iTrent OR
    vacancy_details.SAP=candidate_details.SAP OR
    vacancy_details.Accountancy=candidate_details.Accountancy OR
    vacancy_details.Housing=candidate_details.Housing OR
    vacancy_details.Recruitment=candidate_details.Recruitment OR
    vacancy_details.Advertising=candidate_details.Advertising OR
    vacancy_details.Insurance=candidate_details.Insurance OR
    vacancy_details.Retail=candidate_details.Retail OR
    vacancy_details.Banking=candidate_details.Banking OR
    vacancy_details.IT=candidate_details.IT OR
    vacancy_details.Shipping=candidate_details.Shipping OR
    vacancy_details.BuildersMerchants=candidate_details.BuildersMerchants OR
    vacancy_details.LeisureIndustry=candidate_details.LeisureIndustry OR
    vacancy_details.Software=candidate_details.Software OR
    vacancy_details.Bureaux=candidate_details.Bureaux OR
    vacancy_details.LocalGovernment=candidate_details.LocalGovernment OR
    vacancy_details.Solicitors=candidate_details.Solicitors OR
    vacancy_details.Charity=candidate_details.Charity OR
    vacancy_details.ManagementConsultancy=candidate_details.ManagementConsultancy OR
    vacancy_details.TravelTourism=candidate_details.TravelTourism OR
    vacancy_details.Cleaning=candidate_details.Cleaning OR
    vacancy_details.Manufacturing=candidate_details.Manufacturing OR
    vacancy_details.Transport=candidate_details.Transport OR
    vacancy_details.Construction=candidate_details.Construction OR
    vacancy_details.Media=candidate_details.Media OR
    vacancy_details.Wholesalers=candidate_details.Wholesalers OR
    vacancy_details.Education=candidate_details.Education OR
    vacancy_details.NHS=candidate_details.NHS OR
    vacancy_details.Utilities=candidate_details.Utilities OR
    vacancy_details.Engineering=candidate_details.Engineering OR
    vacancy_details.Petroleum=candidate_details.Petroleum OR
    vacancy_details.EstateAgency=candidate_details.EstateAgency OR
    vacancy_details.Pharmaceuticals=candidate_details.Pharmaceuticals OR
    vacancy_details.Finance=candidate_details.Finance OR
    vacancy_details.PrivateMedical=candidate_details.PrivateMedical OR
    vacancy_details.Hotels=candidate_details.Hotels OR
    vacancy_details.Publishers=candidate_details.Publishers)";
    
    $result3 = @mysql_query($sql3,$connection) 
    or die(mysql_error());
    
    while($row = mysql_fetch_array($result3))
      {
      echo $row['username'];
      echo "<br />";
      }
    
    }
    

  15. I'm at a loss thats all!

     

    Ok, so you say that isnt what a databse is for? but i need to store this data, and that has to be in a database, all i need to do is compare the columns to see if any match.

     

    To be honest, and as you can tell im no expert, but i thought i would just be able to join the tables and see if the columns match?

     

    The bitmask method is something i dont understand yet, and theres a deadline, like tomorrow, so no time to learn what it is and then deploy it in this project

  16. ok

     

    Candidates table (cut down version - there are 200 + columns)

     

    CREATE TABLE candidate_details (
    candidate_details_id		INT(20),
    acca				TINYINT(1),
    msc_bp_mgmt			TINYINT(1),
    adv_dip_p_mgmt			TINYINT(1),
    cert_pay_prac			TINYINT(1),
    cima				TINYINT(1),
    dip_pay_sup			TINYINT(1),
    cipd_qual				TINYINT(1),
    prac_cert_pay			TINYINT(1),
    cipp_deg_pm			TINYINT(1),
    adv_prac_cert			TINYINT(1),
    username				VARCHAR(50));
    

     

     

    vacancy_details table

     

    CREATE TABLE vacancy_details (
    vacancy_details_id		                INT(20),
    acca				TINYINT(1),
    msc_bp_mgmt			TINYINT(1),
    adv_dip_p_mgmt			TINYINT(1),
    cert_pay_prac			TINYINT(1),
    cima				TINYINT(1),
    dip_pay_sup			TINYINT(1),
    cipd_qual				TINYINT(1),
    prac_cert_pay			TINYINT(1),
    cipp_deg_pm			TINYINT(1),
    adv_prac_cert			TINYINT(1),
    vacancy_id			INT(50));
    

     

     

    Now, the recruiter will select what skills they require for the job via check boxes, these are then entered into the database as a '1' for selected, and a '0' for not selected.

     

    The candidate will sign up and select their skills, which will be updated into the database with a '1' for selected, and a '0' for not selected

     

    I need to compare these tables, as long as there is just 1 matching column, I will fire off an email to the candidate

     

    So i just need to know if there is a matching column

     

    Need any more info?

×
×
  • 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.