-
Posts
259 -
Joined
-
Last visited
Posts posted by tobeyt23
-
-
I have a table with addresses in them and need to find the duplicates. Some address will be like 1000 somewhere st or 1000 somewhere Street or 100 main street ste 100 or 100 main st Suite 100. How can i match them up?
table would be like this:
id
address
city
state
zip
Thanks
-
THANKS!
-
Any help would be greatful, I am banging my head here!
-
Still not working, what am I missing?
$_xml_string = '<Order> <EmbeddedDoc DocumentName="TestDoc" DocumentFormat="PDF">jdsahfdhflhfsdlfhdslhsdflsdfhflkdslkfsdhkfhskldhkl</EmbeddedDoc> <EmbeddedDoc DocumentName="TestDoc1" DocumentFormat="PDF">jdsahfdhflhfsdlfhdslhsdflsdfhflkdslkfsdhkfhskldhkl</EmbeddedDoc> </Order>'; $xml = new SimpleXMLElement($_xml_string); foreach ($xml->xpath('//EmbeddedDoc') as $doc) { $doc = '##FILE##'; } $newxml = $xml->asXML(); echo $newxml;
-
$_xml_string = '<Order>
<EmbeddedDoc DocumentName="TestDoc" DocumentFormat="PDF">jdsahfdhflhfsdlfhdslhsdflsdfhflkdslkfsdhkfhskldhkl</EmbeddedDoc>
<EmbeddedDoc DocumentName="TestDoc1" DocumentFormat="PDF">jdsahfdhflhfsdlfhdslhsdflsdfhflkdslkfsdhkfhskldhkl</EmbeddedDoc>
</Order>';
$xml = simplexml_load_string($_xml_string);
foreach ($xml->xpath('//EmbeddedDoc') as $doc) {
$doc = '##FILE##';
}
print_r($xml); -
Any suggestions still cant seem to get the value to change?
-
The xml EmbeddedDoc contains base64 encoded document so I want to string that out before i save the string to DB.
-
Yes, sorry I did do that $_xml_string = simplexml_load_string($_xml_request_data,'SimpleXMLElement', LIBXML_PARSEHUGE); However still cant replace the value.
-
Need to change the value in an XML string tried the following but no luck, any suggestions?
$_xml_string = '<Order> <EmbeddedDoc DocumentName="TestDoc" DocumentFormat="PDF">jdsahfdhflhfsdlfhdslhsdflsdfhflkdslkfsdhkfhskldhkl</EmbeddedDoc> <EmbeddedDoc DocumentName="TestDoc1" DocumentFormat="PDF">jdsahfdhflhfsdlfhdslhsdflsdfhflkdslkfsdhkfhskldhkl</EmbeddedDoc> </Order>'; foreach($_xml_string->Order->EmbeddedDoc as $document) { $document ='##FILE_CONTENT##'; }
-
Thank you!
-
Can you set a variable like so:
Function something(bob = true) {
}
-
I have a table for that we will enable products and a fieldname in another table I reference that field name. How can i query the the product table to get the fieldname if enabled and then pull for the other table where fieldname matches.
table 1:
id: 1
name: test
enabled 1
fieldname is_test_active
table 2:
id: 1
is_test_active: 1
-
I tried doing that and it will not work.
-
This seems to be working:
$xml = preg_replace("/(<\/?)(\w+)[^>]*>)/", "$1$2$3", $_xmlString); $xmlstring = simplexml_load_string($xml); $json = json_encode($xmlstring); $responseArray = json_decode($json,true);
Does anyone have something else i should be doing?
-
Missed it when I copied and pasted.
-
I can't seem to get this to parse into an array:
<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <ns:getReportTestResponse xmlns:ns="http://webservice.avm.pvads.com"> <ns:return xmlns:ax21="http://webservice.avm.pvads.com/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:WSReportBean"> <ax21:confidence /> <ax21:dateStamp>12/07/2007</ax21:dateStamp> <ax21:html>adsasdasdsadasd</ax21:html> <ax21:pdsReference /> <ax21:product>AVi (Exterior AND Interior Inspection) - 48hr RUSH</ax21:product> <ax21:sourceData /> <ax21:successful>true</ax21:successful> <ax21:value>168000.0</ax21:value> </ns:return> </ns:getReportTestResponse> </soapenv:Body> </soapenv:Envelope
Tried simplexml_load_string and comes back with nothing. Any help would be great thanks.
-
Thanks again!
-
Thank you I took your suggestion and made the better array. Yes works much much better thank you!
-
I have an array and want to generate a table for each data set that has the same product name. Completely drawning a brain fart on this one.
Array ( [0] => Array ( [product] => Array ( [name] => 1004 URAR [county] => KENT [mean] => 366.67 [median] => 375.00 [mode] => 375.00 ) ) [1] => Array ( [product] => Array ( [name] => 1004 URAR [county] => NEW CASTLE [mean] => 360.00 [median] => 375.00 [mode] => 375.00 ) ) [2] => Array ( [product] => Array ( [name] => 1004 URAR [county] => SUSSEX [mean] => 378.57 [median] => 375.00 [mode] => 375.00 ) ) [3] => Array ( [product] => Array ( [name] => 1004 URAR W MC & UAD [county] => KENT [mean] => 0.00 [median] => 0.00 [mode] => 0.00 ) ) [4] => Array ( [product] => Array ( [name] => 1004 URAR W MC & UAD [county] => NEW CASTLE [mean] => 0.00 [median] => 0.00 [mode] => 0.00 ) ) [5] => Array ( [product] => Array ( [name] => 1004 URAR W MC & UAD [county] => SUSSEX [mean] => 0.00 [median] => 0.00 [mode] => 0.00 ) ) [6] => Array ( [product] => Array ( [name] => 1073 CONDO [county] => KENT [mean] => 370.83 [median] => 375.00 [mode] => 375.00 ) ) [7] => Array ( [product] => Array ( [name] => 1073 CONDO [county] => NEW CASTLE [mean] => 305.65 [median] => 375.00 [mode] => 375.00 ) ) [8] => Array ( [product] => Array ( [name] => 1073 CONDO [county] => SUSSEX [mean] => 375.00 [median] => 400.00 [mode] => 400.00 ) ) )
So i want a new table when the ['product']['name'] doesn't match. Any suggestions, thanks in advance
-
I was just about to ask if it is a datetime field, anyways thanks that worked.
-
Sorry I was doing some testing and copied the wrong query. If I break it out for todays date I get results if I do it with CURDATE doesn't return anything.
-
This returns no records:
SELECT invoices.year, users.id, users.user_type_id, users.parent_id, users.username, users.fname, users.lname FROM invoices LEFT JOIN users ON invoices.user_id = users.id WHERE invoices.created = CURDATE() - INTERVAL 1 YEAR
However this returns what it should why is that:
SELECT invoices.year, users.id, users.user_type_id, users.parent_id, users.username, users.fname, users.lname FROM invoices LEFT JOIN users ON invoices.user_id = users.id WHERE YEAR(invoices.created) = 2011 AND DAYOFMONTH(invoices.created) = 2 AND MONTH(invoices.created) = 8
-
Thank you!
-
I am trying to create yearly invoices for our subscribers. So what I did was create a query to compare todays date to the created date and see if it is a year old. Thought it was working but it pulls everything again on the next day, any suggestions:
SELECT invoices.year, users.id, users.user_type_id, users.parent_id, users.username, users.fname, users.lname FROM invoices LEFT JOIN users ON invoices.user_id = users.id WHERE YEAR(invoices.created) <= ".(date('Y')-1)." AND DAYOFMONTH(invoices.created) <= ".date('d')." AND MONTH(invoices.created) <= ".date('m')."
Selecting Like values within the same table.
in MySQL Help
Posted
How do you find values in the same table that are a like?