Jump to content

Greywacke

Members
  • Posts

    510
  • Joined

  • Last visited

Everything posted by Greywacke

  1. hi again,this problem has resurfaced and i am not sure how. the database contains the characters represented by the “ and ” html entities, but the xml is returning them both as � despite being defined as <?xml version="1.0" encoding="utf-8"?> this has even been tried as <?xml version="1.0" encoding="UTF-8"?> with the xhtml 1.0 document having <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> in the header and accept-charset="utf-8" as a form attribute.should they all be UTF-8 or utf-8, if not - where should they be which?
  2. heh yeah, sometimes... the issue is not resolved however - there are problems in the script itsself. i'll have to update the downloads for them at http://www.greywacke.co.za/ajax_prospects.js and http://www.greywacke.co.za/ajax_prospects.xml.
  3. ah was simpler than i thought, updated with the following statements UPDATE 6_serviceleads SET text_LeadAttributes = REPLACE(text_LeadAttributes, "\n", "") WHERE text_LeadAttributes LIKE "%\n%";UPDATE 6_serviceleads SET text_LeadAttributes = REPLACE(text_LeadAttributes, "\r", "") WHERE text_LeadAttributes LIKE "%\r%"; issue resolved!
  4. hi there,what would the sql update query look like to remove new lines and carriage return characters from a text column? i've been searching the web but come up with nothing relative.
  5. okay i noticed that not all leads had the canopy_req, canopy_style and vehicle_make_model or Requirement and products_description attributes.rather the attributes are there, just no keys.this issue has been resolved.
  6. okay the error is gone, but now it bombs out whilst parsing the prospects xml (i assume in the alertContents function because this is where the loading "film" gets hidden when complete. there are also no errors present in firefox) 0othe xml generated is available at this location and the javascript that is supposed to parse it is in the file here.
  7. hi again,i receive this error in firefox when parsing the xml: when i click on the link to see the source, i receive the following source with the erratic line highlighted in bold:<lead> <id>1107</id> <consumer>Owen Rhoda;oarhoda@webmail.co.za;0829200855;Cape Town</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = new_white<br />canopy_style = lowline_luxury<br />budget = R5,000 to R7,500<br />fitment = ASAP<br />vehicle_status = possession_yes<br />vehicle_make_model = Ford - Bantam<br />year_model = 2008</attribs> <message>&nbsp;</message> <region>Western Cape - Cape Town</region> <created>2010-04-15 14:37:10</created> <forwardpossible supplierid="27" suppliername="Bobaas Canopies (Vereeniging)" /> <forwardpossible supplierid="28" suppliername="Bucco Canopies (Gauteng)" /> <forwardpossible supplierid="21" suppliername="Bucco Canopies (Pinetown)" /> <forwardpossible supplierid="45" suppliername="Bucco Canopies (Port Elizabeth)" /> <forwardpossible supplierid="39" suppliername="Bush Buck Canopies (Cape Town)" /> <forwardpossible supplierid="38" suppliername="Canopy King (Pinetown)" /> <forwardpossible supplierid="34" suppliername="Canopyman (George)" /> <forwardpossible supplierid="35" suppliername="Canopymart (Bellville)" /> <forwardpossible supplierid="46" suppliername="Faaz Fit Canopy (West Rand)" /> <forwardpossible supplierid="33" suppliername="George Canopies (George)" /> <forwardpossible supplierid="36" suppliername="Roamerrand (Cape Town)" /> <forwardpossible supplierid="43" suppliername="Roamerrand (Polokwane)" /> <forwardpossible supplierid="44" suppliername="SA Canopy (Polokwane)" /> <forwardpossible supplierid="30" suppliername="Silverton Canopy Centre (Pretoria)" /> <forwardpossible supplierid="41" suppliername="Xtreme Canopies (Randfontein)" /> <forwardpossible supplierid="37" suppliername="ZZ Tops (Strand)" /> <forwarded prospectid="1107" prospectordinal="04" messagecount="99" suppliername="Bush Buck Canopies (Cape Town)" sent="2010-04-15 14:37:11" contactname="Venecia or Donovan" contactposition="Owner" contactemail="bush.buck@telkomsa.net" contacttel="0217041114" /> <forwarded prospectid="1107" prospectordinal="03" messagecount="99" suppliername="Canopymart (Bellville)" sent="2010-04-15 14:37:10" contactname="Chris Boltman" contactposition="Owner" contactemail="chris@canopymart.co.za" contacttel="0219451080" /> <forwarded prospectid="1107" prospectordinal="01" messagecount="99" suppliername="Roamerrand (Cape Town)" sent="2010-04-15 14:37:10" contactname="Arno Lotz" contactposition="Owner" contactemail="arno@roamerrand.co.za" contacttel="0219518179" /> <forwarded prospectid="1107" prospectordinal="02" messagecount="99" suppliername="ZZ Tops (Strand)" sent="2010-04-15 14:37:10" contactname="Kathy Coetzer" contactposition="Owner" contactemail="zztops@telkomsa.net" contacttel="0218547796" /></lead><lead> <id>1099</id> <consumer>Werner Pieterse;duraplumbing@gmail.com;082 848 9132;Durbanville</consumer> <duplicates>No Duplicates Found</duplicates> [b]<attribs>canopy_req = pre-owned_colour_coded<br />canopy_style = low_or_highline_standard<br />budget = R4,000 to R5,000<br />fitment = ASAP<br />vehicle_status = possession_yes<br />vehicle_make_model = Opel - Corsa<br />year_model = 2005</attribs>[/b] <message>&nbsp;</message> <region>Western Cape - Cape Town</region> <created>2010-04-15 09:05:14</created> <forwardpossible supplierid="27" suppliername="Bobaas Canopies (Vereeniging)" /> <forwardpossible supplierid="28" suppliername="Bucco Canopies (Gauteng)" /> <forwardpossible supplierid="21" suppliername="Bucco Canopies (Pinetown)" /> <forwardpossible supplierid="45" suppliername="Bucco Canopies (Port Elizabeth)" /> <forwardpossible supplierid="39" suppliername="Bush Buck Canopies (Cape Town)" /> <forwardpossible supplierid="38" suppliername="Canopy King (Pinetown)" /> <forwardpossible supplierid="34" suppliername="Canopyman (George)" /> <forwardpossible supplierid="35" suppliername="Canopymart (Bellville)" /> <forwardpossible supplierid="46" suppliername="Faaz Fit Canopy (West Rand)" /> <forwardpossible supplierid="33" suppliername="George Canopies (George)" /> <forwardpossible supplierid="36" suppliername="Roamerrand (Cape Town)" /> <forwardpossible supplierid="43" suppliername="Roamerrand (Polokwane)" /> <forwardpossible supplierid="44" suppliername="SA Canopy (Polokwane)" /> <forwardpossible supplierid="30" suppliername="Silverton Canopy Centre (Pretoria)" /> <forwardpossible supplierid="41" suppliername="Xtreme Canopies (Randfontein)" /> <forwardpossible supplierid="37" suppliername="ZZ Tops (Strand)" /> <forwarded prospectid="1099" prospectordinal="02" messagecount="99" suppliername="Canopymart (Bellville)" sent="2010-04-15 09:05:14" contactname="Chris Boltman" contactposition="Owner" contactemail="chris@canopymart.co.za" contacttel="0219451080" /> <forwarded prospectid="1099" prospectordinal="01" messagecount="99" suppliername="ZZ Tops (Strand)" sent="2010-04-15 09:05:14" contactname="Kathy Coetzer" contactposition="Owner" contactemail="zztops@telkomsa.net" contacttel="0218547796" /></lead> these elements are enclosed by root tags. where does this error come from? is the child element limited by size perhaps? the whole xml file generated is available here.the complete javascript that parses this can be retrieved from here.this is only an excerpt of the xml returned that the error in firefox turns to, i'm not quite sure how to use firebug to debug this one...somebody please help!
  8. rofl i can laugh at myself at times like this ^^there was nothing wrong with the function itsself, the problem was with the way it was called for the attributes :)it was called as dropattribs(0) (for active suppliers) instead of dropattribs(2) (for prospecting suppliers) :)this issue has been resolved
  9. okay, i've updated the function as follows: function dropattribs($status) { // status 0 and 2 foreach ($GLOBALS[($status==0)?"mailadds":"mailaddp"] as $i => $mailadd) { // begin iterate suppliers array $arr = split(";;;",$mailadd); // get supplier id $sid = $arr[6]; foreach ($GLOBALS["attribsarr"] as $key => $value) { // begin iterate form attributes // select current attribute key and bound values for supplier that are not requirements $tsql = "SELECT 3_serviceattributes.text_AttributeValue FROM 9_supplierattributes JOIN (3_serviceattributes) ON (9_supplierattributes.bigint_AttributeID = 3_serviceattributes.bigint_AttributeID) WHERE 3_serviceattributes.text_AttributeDescription LIKE \"%".$key."%\" AND 9_supplierattributes.bigint_ServiceID = ".$GLOBALS["service"]." AND 9_supplierattributes.bigint_RegionID = ".$GLOBALS["region"]." AND 9_supplierattributes.bigint_SupplierID = ".$sid.";"; $result = mysql_query_errors($tsql, $conn , __FILE__ , __LINE__ , false); if ($result) { // begin if mysql result while ($row = mysql_fetch_array($result)) { // begin while suppliers !attribs if (stristr($value,$row["text_AttributeValue"]) != FALSE) { // begin if db value in attrib value // drop current $i from $mailadds/p array unset($GLOBALS[($status==0)?"mailadds":"mailaddp"][$i]); } // end if db value in attrib value } // end while suppliers !attributes } // end if mysql result mysql_free_result($result); } // end iterate form attributes } // end iterate suppliers array} this results from the sql query is the following recordset as tested in PMA: [b]text_AttributeValue[/b]KCABGonowGMWFiatFord - F250DCABChanaCCABAsiawingL/CruiserMahindraMeiyaNissan - NavaraNissan - PatrolProton - ArenaSCABSsangyong - Musso DCABSoyatTata - TelcolineTata - XenonVolkswagen - Transporter now to test. then if it still does not work, i've got to make sure that the loops are correct.
  10. i've tested the handler again, after deleting the one on the server, uploading the updated one, submitting the form again with Toyota - DCAB as the vehicle_make_model attribute.however, the vehicle_make_model = DCAB attribute which was linked to the supplier Roamerrand - does not cause Roamerrand to get unset from the array.somebody please help!the recordset checked for Roamerrand (supplier id 36), is as follows: bigint_SupplierID bigint_ServiceID bigint_Regionid bigint_AttributeID bigint_AttributeIDtext_AttributeDescription text_AttributeValue bigint_AttributeServiceID36 1 28 308 308 vehicle_make_model Asiawing 136 1 28 384 384 vehicle_make_model CCAB 136 1 28 309 309 vehicle_make_model Chana 136 1 28 381 381 vehicle_make_model DCAB 136 1 28 370 370 vehicle_make_model Fiat 136 1 28 371 371 vehicle_make_model Ford - F250 136 1 28 373 373 vehicle_make_model GMW 136 1 28 372 372 vehicle_make_model Gonow 136 1 28 385 385 vehicle_make_model KCAB 136 1 28 387 387 vehicle_make_model L/Cruiser 136 1 28 374 374 vehicle_make_model Mahindra 136 1 28 307 307 vehicle_make_model Meiya 136 1 28 353 353 vehicle_make_model Nissan - Navara 136 1 28 354 354 vehicle_make_model Nissan - Patrol 136 1 28 356 356 vehicle_make_model Proton - Arena 136 1 28 383 383 vehicle_make_model SCAB 136 1 28 388 388 vehicle_make_model Soyat 136 1 28 357 357 vehicle_make_model Ssangyong - Musso DCAB 136 1 28 386 386 vehicle_make_model Tata - Telcoline 136 1 28 378 378 vehicle_make_model Tata - Xenon 136 1 28 369 369 vehicle_make_model Volkswagen - Transporter 1 i noticed that the returned result has 2 duplicate fields AttributeID. and ServiceID.i've located the following page too:but i am unsure if this would be a viable option to use instead of unset, if that is the issue here.http://www.bin-co.com/php/scripts/array_remove.php
  11. hi again,i've developed the following function to drop the suppliers by attributes they do not support from the array retrieved by region. function dropattribs($status) { // status 0 (active) and 2 (prospecting) foreach ($GLOBALS[ // begin iterate suppliers array ($status==0)? "mailadds": "mailaddp"] as $i => $mailadd) { $arr = split(";;;",$mailadd); // get supplier id $sid = $arr[6]; // begin iterate form attributes foreach ($GLOBALS["attribsarr"] as $key => $value) { // select current attribute key and bound values // for supplier that are not requirements $tsql = "SELECT * FROM 9_supplierattributes JOIN (3_serviceattributes) ON ( 9_supplierattributes.bigint_AttributeID = 3_serviceattributes.bigint_AttributeID ) WHERE 3_serviceattributes.text_AttributeDescription LIKE \"%".$key."%\" AND 3_serviceattributes.bigint_AttributeServiceID = ".$GLOBALS["service"]." AND 9_supplierattributes.bigint_SupplierID = ".$sid.";"; $result = mysql_query_errors($tsql, $conn , __FILE__ , __LINE__ , false); if ($result) { // begin if mysql result // begin while suppliers !attribs while ($row = mysql_fetch_array($result)) { // begin if db value in attrib value [b]if (stristr($value,$row["text_AttributeValue"])!= FALSE) {[/b] // drop current $i from $mailadds/p array unset($GLOBALS[($status==0)? "mailadds":"mailaddp"][$i]); } // end if db value in attrib value } // end while suppliers !attributes } // end if mysql result mysql_free_result($result); // free sql result } // end iterate form attributes } // end iterate suppliers array} it is supposed to iterate the suppliers arraythen within that iterate the form attributes, which are successfully retrieved (can see that from enabling sql logging in the mysql_query_errors function.)for each form attribute, i attempt selecting the attributes and values from the attributes set against each supplier. if it gets a match, it checks that attribute value for the nonvalue selected from the db.if found, it is supposed to drop the suppliers array element. but it does not, what could be wrong here?the line in bold, the case insensitive stristr check, seems to be the problem.running a test query in pma of the database with the following string matches a few nonattributes: SELECT * FROM 9_supplierattributes JOIN (3_serviceattributes) ON (9_supplierattributes.bigint_AttributeID = 3_serviceattributes.bigint_AttributeID) WHERE 3_serviceattributes.text_AttributeDescription LIKE "%vehicle_make_model%" AND 3_serviceattributes.bigint_AttributeServiceID = 1 AND 9_supplierattributes.bigint_SupplierID = 36; one of them is DCAB which is supposed to be detected in the value received from the form, Toyota - DCAB, yet it is not and the supplier gets included in the prospecting array ($mailaddp) when it is mailed.okay, after a bit of reading up - i've changed the if statement to check it not against FALSE for removing.
  12. hi again,here is the sql string i am attempting to run: SELECT 5_suppliers.text_ContactFirstName, 5_suppliers.text_ContactSurname, 5_suppliers.text_SupplierName, 5_suppliers.`text_ContactE-mail`, 5_suppliers.bigint_CurrentBalance, 5_suppliers.bigint_ContactTel, 5_suppliers.text_SupplierAddress, 5_suppliers.bigint_SupplierID, 5_suppliers.text_GoogleMapsURL, 5_suppliers.text_VTigerData FROM 5_suppliers LEFT JOIN ( 4_servicesuppliers) ON ( 4_servicesuppliers.bigint_SupplierID = 5_suppliers.bigint_SupplierID) WHERE 5_suppliers.smallint_SupplierStatus = 0 AND 4_servicesuppliers.bigint_ServiceID = 1 AND 4_servicesuppliers.bigint_RegionID = 41;
  13. okay another error has surfaced,unrelated to the topic but related to the error handling, will add url to this reply when done.
  14. wow lol, it had to be improved to use replace all:find: ([\t ]+)([\$\w]+)( = mysql_query)\(([\$\w]+)[^\},]+[\}] replace: $1$2$3_errors\($4,$conn,__FILE__,__LINE__\); i believe it is truly complete now
  15. rethought again (probably about the 18th time), and it still refuses to match 0oworks ([\t ]+)([\$\w]+)( = mysql_query)\(([^\)]+)[^\}]+[\}] replacing it with the following, to implement the error handling function: $1$2$3_errors\($4, $conn, __FILE__, __LINE__\); this issue is RESOLVED!!!
  16. rethought again, and it still refuses to match 0o \$[\t =]mysql_query([\$\w, ]);[\n.]\}
  17. after rethinking, i've come up with the following to match that code that needs replacing, but it still won't match, wether the }'s are escaped or not: [\t =]mysql_query([\W\w\s]);[\n.^}]}
  18. hi all,i need to match a regular expression searching a string for the following example, regardless of indentation and result name as well as well as sql strings:the top level sql is defined as an array now, and joined when echoing at the end of the xml page. $result0 = mysql_query($sql0); $err = "ERROR #".mysql_errno().": ".mysql_error()." on Line ".(__LINE__-1); if (mysql_errno()> 0) { $GLOBALS["sql"] .= $sql0; $GLOBALS["sql"] .= strtoupper($err)."\n"; } the indentation, mysql result and sql string names vary across the source code.i'm currently redeveloping the error trapping to a page level array, with the following function (i need to be notified of empty result sets too): $sql = array();function mysql_query_errors($sql, $conn, $doc, $line) { $result = mysql_query($sql,$conn); if (mysql_num_rows($result) < 1 || mysql_errno($conn) > 0) { if (mysql_num_rows($result) < 1) { $err = "ERROR #0000: An empty result set was returned by the query defined in ".$doc." on line ".$line--; } elseif (mysql_errno($conn) > 0) { $err = "ERROR #".mysql_errno($conn).": ".mysql_error($conn)." in ".$doc." on Line ".$line; } array_push($GLOBALS["sql"],$sql,$err); } return $result;}echo " <sql>".xmlentities(join("\n",$sql))."</sql>\n"; // echoed at end of page the ajax alerts errors only if <sql></sql> contains text.i've managed to come up with the following sofar: [\t ]*\$\w+ = mysql_query(.+);[\n\r.]+\} i need to go and replace all the instances of the code above with the following: $result = mysql_query_errors($tsql, $conn, __FILE__, __LINE__); with the relevant indentation and result name as well as well as sql strings.however it does not match in Dreamweaver CS4 (which has wonderful "as you type" javascript syntax handling ^^)... i've just about run out of ideas, heres the reference to Regular Expressions in Dreamweaver CS4.i've placed it on the forum where the code is the most relevant.
  19. awesome ^^seems this issue has been cleared :)was supposed to delete in the leads and prospectleads tables first, then delete the sent records that don't have matches in the prospectleads table. :)ISSUE RESOLVED!!! (didn't realise that PMA parses multiple sql statements ) DELETE FROM 6_serviceleads WHERE text_Consumer LIKE "%pierre@greywacke.co.za%";DELETE FROM 10_serviceprospects WHERE text_Consumer LIKE "%pierre@greywacke.co.za%";DELETE FROM 13_prospectleadsent WHERE NOT EXISTS (SELECT * FROM 10_serviceprospects WHERE 10_serviceprospects.bigint_ProspectID = 13_prospectleadsent.bigint_ProspectID);
  20. okay after revisiting this issue, i have come up with the following solution: DELETE FROM 6_serviceleads WHERE text_Consumer LIKE "%pierre@greywacke.co.za%";DELETE FROM 10_serviceprospects WHERE text_Consumer LIKE "%pierre@greywacke.co.za%";DELETE FROM 13_prospectleadsent WHERE bigint_ProspectID NOT EXISTS (SELECT * FROM 10_serviceprospects WHERE text_Consumer LIKE "%pierre@greywacke.co.za%"); to rather do it as three seperate queries. however, i receive an error here saying the following: this is on the third and last query now. what would be wrong here?
  21. relatively quickly, it might be cos of a client side error too. the large xml requests work, only when a mail is being sent before does it take longer and exceed the timeout.it seems that a sql error occurs when the email is being sent, and it halts the script 0o so i do not get the email result or the returned sql statements and errors :/if i alert the xml returned, it cuts off most of it.eg when loading the page: <?xml version="1.0" encoding="ISO-8859-1"?><root> <order name="Bakkie Canopy"> <lead> <id>1187</id> <consumer>Herbert Stanley;herberts@sanlam4u.com.na;0811221236;Windhoek</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>products_description = Opel Corsa Canopy - Lowline<br />Bakkie model = 2004 - current model<br />Requirement = New - White<br />Colour code = Athenian White<br />Features = Brake light, Interior light<br />Budget = R5,000 to R7,500<br />Fitment = Within the next month</attribs> <message>Canopy for opel 2010 model supplied and fitted</message> <sent>0</sent> <created>2010-04-10 12:53:58</created> <service id="1" name="Bakkie Canopy" cost="20" /> /> <region id="26" name="Other - Namibia" /> </lead> <lead> <id>1186</id> <consumer>Loure Van Eeden;gjvaneeden@gmail.com;0846132814;Riversdal </consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_white<br />canopy_style = lowline_standard<br />budget = R4,000 to R5,000<br />fitment = within_month<br />vehicle_status = possession_yes<br />vehicle_make_model = Mazda - DCAB<br />year_model = 2006</attribs> <message>&nbsp;</message> <sent>0</sent> <created>2010-04-10 12:30:25</created> <service id="1" name="Bakkie Canopy" cost="20" /> /> <region id="66" name="western_cape_george" /> </lead> <lead> <id>1185</id> <consumer>Roelof Van Wyk;treoscape@gmail.com;0715682526;Pretoria</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>products_description = Isuzu Ext/C Canopy - Lowline<br />Bakkie model = 2007 - current model<br />Requirement = New - Colour-coded<br />Colour code = Silver Lightning<br />Features = Brake light<br />Budget = R7,500 to R10,000<br />Fitment = ASAP</attribs> <message>Quotations</message> <sent>1</sent> <created>2010-04-09 19:53:03</created> <service id="1" name="Bakkie Canopy" cost="20" /> <supplier id="23" name="Canopy and Weca Centre (Centurion)" w3a="www.weca.co.za" contact="Werner Schaap" position="Owner" mail="weca@mweb.co.za" tel="27126533165" bal="1240" /> <region id="24" name="Gauteng - Tshwane Metro" /> </lead> <lead> <id>1184</id> <consumer>C A McGrath;craigamcgrath@gmail.com;0829032477;East Rand</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_white<br />canopy_style = lowline_standard<br />budget = R3,000 to R4,000<br />fitment = ASAP<br />vehicle_status = possession_yes<br />vehicle_make_model = Nissan - 1400<br />year_model = 2000</attribs> <message>&nbsp;</message> <sent>1</sent> <created>2010-04-09 15:15:11</created> <service id="1" name="Bakkie Canopy" cost="20" /> <supplier id="23" name="Canopy and Weca Centre (Centurion)" w3a="www.weca.co.za" contact="Werner Schaap" position="Owner" mail="weca@mweb.co.za" tel="27126533165" bal="1240" /> <region id="62" name="gauteng_ekurhuleni" /> </lead> <lead> <id>1183</id> <consumer>Hennie De Jager Or Christo;el-shaddai@absamail.co.za;082 968 7310 /0827656200;Nigel</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_white<br />canopy_style = lowline_standard<br />budget = R3,000 to R4,000<br />fitment = ASAP<br />vehicle_status = possession_yes<br />vehicle_make_model = Opel - Corsa<br />year_model = 1999</attribs> <message>Half door</message> <sent>1</sent> <created>2010-04-09 05:28:32</created> <service id="1" name="Bakkie Canopy" cost="20" /> <supplier id="23" name="Canopy and Weca Centre (Centurion)" w3a="www.weca.co.za" contact="Werner Schaap" position="Owner" mail="weca@mweb.co.za" tel="27126533165" bal="1240" /> <region id="62" name="gauteng_ekurhuleni" /> </lead> <lead> <id>1152</id> <consumer>Gerhard Venter;gerros@mweb.co.za;0832524268;Bloemfontein</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>products_description = Nissan Navara Canopy - Lowline<br />Bakkie model = 2005 - current model<br />Requirement = Pre-owned - White<br />Colour code = White Non-coded (standard)<br />Budget = R3,000 to R4,000<br />Fitment = Within the next 2 months</attribs> <message>Na</message> <sent>0</sent> <created>2010-04-08 22:20:31</created> <service id="1" name="Bakkie Canopy" cost="20" /> /> <region id="34" name="Free State - Bloemfontein" /> </lead> <lead> <id>1151</id> <consumer>Venter;gerros@mweb.co.za;0832524268;Bloemfontein</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_white<br />canopy_style = highline_standard<br />budget = R3,000 to R4,000<br />fitment = within_2_months<br />vehicle_status = possession_yes<br />vehicle_make_model = Nissan - Navara<br />year_model = 2008</attribs> <message>&nbsp;</message> <sent>0</sent> <created>2010-04-08 21:51:15</created> <service id="1" name="Bakkie Canopy" cost="20" /> /> <region id="47" name="free_state_bloem" /> </lead> <lead> <id>1150</id> <consumer>Preveshy Sing;eastlink@telkomsa.net;0829087192;Ladysmith</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_white<br />canopy_style = highline_full_door<br />budget = R4,000 to R5,000<br />fitment = within_2_weeks<br />vehicle_status = possession_yes<br />vehicle_make_model = Opel - Corsa<br />year_model = 2008</attribs> <message>&nbsp;</message> <sent>1</sent> <created>2010-04-08 21:25:09</created> <service id="1" name="Bakkie Canopy" cost="20" /> <supplier id="20" name="City Canopies (Durban)" w3a="http://www.skytopcanopies.co.za/" contact="Farouk Kahn" position="Owner" mail="citycanopies@gmail.com" tel="27313683983" bal="920" /> <region id="45" name="kwazulu_natal_durban" /> </lead> <lead> <id>1149</id> <consumer>Ivor Novello;velloin@gmail.com;0823305610;Phalaborwa</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_colour_coded<br />canopy_style = lowline_standard<br />budget = R5,000 to R7,500<br />fitment = not_within_3_months<br />vehicle_status = possession_yes<br />vehicle_make_model = Mazda - DCAB<br />year_model = 2003</attribs> <message>&nbsp;</message> <sent>0</sent> <created>2010-04-08 17:52:00</created> <service id="1" name="Bakkie Canopy" cost="20" /> /> <region id="48" name="limpopo_polokwane" /> </lead> <lead> <id>1148</id> <consumer>RUDI VAN DER WAL;rudi.vdwal@absa.co.za;0829247485;Pretoria</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_white<br />canopy_style = low_or_highline_standard<br />budget = R3,000 to R4,000<br />fitment = not_within_3_months<br />vehicle_status = possession_yes<br />vehicle_make_model = Nissan - DCAB<br />year_model = 2007</attribs> <message>&nbsp;</message> <sent>1</sent> <created>2010-04-08 17:05:26</created> <service id="1" name="Bakkie Canopy" cost="20" /> <supplier id="23" name="Canopy and Weca Centre (Centurion)" w3a="www.weca.co.za" contact="Werner Schaap" position="Owner" mail="weca@mweb.co.za" tel="27126533165" bal="1240" /> <region id="13" name="gauteng_tshwane" /> </lead> <lead> <id>1146</id> <consumer>Wiedaad Noordien;wiedaad.noordien@kpmg.co.za;0832905899;Cape Town</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_colour_coded<br />canopy_style = lowline_standard<br />budget = R4,000 to R5,000<br />fitment = ASAP<br />vehicle_status = possession_no_ordered<br />vehicle_make_model = Opel - Corsa<br />year_model = 2006</attribs> <message>&nbsp;</message> <sent>1</sent> <created>2010-04-08 14:29:50</created> <service id="1" name="Bakkie Canopy" cost="20" /> <supplier id="7" name="Just Canopies (Cape Town)" w3a="www.servicexchange.co.za" contact="Chris Smith" position="Owner" mail="justcanopies@telkomsa.net" tel="27215566821" bal="140" /> <region id="11" name="western_cape_capetown" /> </lead> <lead> <id>1147</id> <consumer>Wiedaad Noordien;wiedaad.noordien@kpmg.co.za;0832905899;Cape Town</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_colour_coded<br />canopy_style = lowline_standard<br />budget = R4,000 to R5,000<br />fitment = ASAP<br />vehicle_status = possession_no_ordered<br />vehicle_make_model = Opel - Corsa<br />year_model = 2006</attribs> <message>&nbsp;</message> <sent>1</sent> <created>2010-04-08 14:29:50</created> <service id="1" name="Bakkie Canopy" cost="20" /> <supplier id="8" name="Continental Canopies (Cape Town)" w3a="http://www.continentalmotors.co.za/" contact="Dries Lubbe" position="Owner" mail="johncox@live.co.za" tel="27215114787" bal="680" /> <region id="11" name="western_cape_capetown" /> </lead> <lead> <id>1144</id> <consumer>Wayne;wayne.z@live.co.za;0797841683;Cape Town</consumer> <duplicates>No Duplicates Found</duplicates> <attribs>canopy_req = pre-owned_white<br />canopy_style = lowline_standard<br />budget = R4,000 to R5,000<br />fitment = ASAP<br />vehicle_status = possession_yes<br />vehicle_make_model = Nissan - DCAB<br />year_model = 2005</attribs> <message>&nbsp;</message> <sent>1</sent> <created>2010-04-08 14:18:48</created> <service id="1" name="Bakkie Canopy" cost="20" /> <supplier id="8" name="Continental Canopies (Cape Town)" w3a="http://www.continentalmotors.co.za/" contact="Dries Lubbe" position="Owner" ma the longer lines have been carried over to the next line to fit the post on smaller resolutions. should i forward a lead, the response doesn't even get alerted.okay, i think only the alert buffer was filled, the response text was too big to fit in an alert (i'll have to do a div to display it in after a while). all the xml entities are parsed - this issue has been resolved.
  22. hi all,we did not foresee the large amount of lead information generated by the site, so now it seems that when in the region of 238 leads, an incomplete xml document is received by the client which breaks the xml (stops midway through an attribute, tag incomplete, no closing tags). there are no supplier or regions listed then, except the individual ones per lead.i seem to have run into a brick wall regarding the many options available to me. returning an xml including the count of leads, regions and suppliers then doing an ajax request for each lead, region and supplier.i would just like to verify wether this is correct or not.
  23. i need to delete from all 3 of them: 1) all records in leads table (6_serviceleads) with the text_Consumer field containing pierre@greywacke.co.za 2) all records in prospect leads table (10_serviceprospects) with the text_Consumer field containing pierre@greywacke.co.za 3) all records in prospect leads sent table (13_serviceprospectsent) bound by bigint_ProspectID in table 2.DELETE JOIN statements are allowed according to the Official MySQL Documentation.
  24. hi, me again...battling with the following statement: DELETE FROM 6_serviceleads, 10_serviceprospects JOIN 13_serviceprospectsent ON (10_serviceprospects.bigint_ProspectID = 13_serviceprospectsent.bigint_ProspectID) WHERE 6_serviceleads.text_Consumer LIKE "%pierre@greywacke.co.za%" OR 10_serviceprospects.text_Consumer LIKE "%pierre@greywacke.co.za%"; the service leads is an independent table in this situation, the service prospects has multiple entries per prospect. i believe i can use a WHERE IN clause or something but my clarity of intent has faded.i'll let you guys play around with it in the mean time
×
×
  • Create New...