Jump to content

alecthorne

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by alecthorne

  1. Dear requinix and benanamen, apologies for the extremely late reply to both your answers. Sadly the syntax of the array is set by the ZOO application I use for Joolma. The PHP routines I wrote originally are extremely old, and sadly represent my lacking knowledge in PHP, but I would like to update the values in-line with what I have written before (if possible) I tried the following, but the new value is not returned to the array $zooelements["de37ea08-9c88-4479-8453-fc020fe91eb9"] = "NameEFGH"; $query5 = "UPDATE link_zoo_item SET elements=$zooelements WHERE id=$id"; $result5 = mysql_query($query5); Is there something that I have missed? Many thanks, Alec
  2. I am using the application ZOO with Joomla, which stores information within a multi dimensional array with a field named 'elements'. The format is similar to that shown below. { "0ad767a2-b0d6-42fe-abb9-cf7d3e62c88b": { "0": { "value": "NameABCD" } }, "4adc7e1d-1124-450a-986f-a4df1bb7b4c0": { "0": { "value": "E-MailABCD" } }, } I am not a php programmer, but with help I managed to extract the information using the a @mysql_query and the following: $elements = $row['elements']; $zooelements = json_decode($elements); $name = $zooelements->{"0ad767a2-b0d6-42fe-abb9-cf7d3e62c88b"}->{"0"}->value; My problem is if I want to change any value e.g. $name="NameEFGH", how can I propogate this new value back to the array using a @mysql_query such as: $query = "UPDATE link_zoo_item SET elements=???? Any help as a beginner would be much appreciated, Alec
  3. Have just seen the error and it works a treat. Thanks for pointing that out. Alec
  4. Just to start, I know very little about PHP. I am using Joomla 3.4.1 in combination with ZOO, and would like to extract the itemid (in this case 216) from a typical URL as that shown below: http://www.linkindustry.com/index.php?option=com_zoo&task=item&item_id=241&Itemid=216 I have tried using the suggestion below, found within another PHP question, however it sadly does not work: $db = JFactory::getDbo(); $articleid = JRequest::getInt('id'); echo $articleid; Can someone point me in the right direction. Many thanks, Alec
×
×
  • 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.