
simonp
Members-
Posts
132 -
Joined
-
Last visited
Profile Information
-
Gender
Not Telling
simonp's Achievements

Regular Member (3/5)
0
Reputation
-
I want to add another item to the order_lines array but however I do it I end up with an error: $data = [ 'purchase_country'=>$company_country, 'purchase_currency'=>$currency_nm, 'order_amount'=>$api_amount, 'locale'=>"en-GB", 'order_tax_amount'=>0, 'order_lines'=>[ [ 'name'=>$product_name, 'quantity'=>1, 'unit_price'=>$api_amount, 'tax_rate'=>0, 'total_amount'=>$api_amount, 'total_tax_amount'=>0 ] ], "intent"=>"buy" ]; I thought this would work: 'order_lines'=>[ [ 'name'=>$product_name, 'quantity'=>1, 'unit_price'=>$api_amount, 'tax_rate'=>0, 'total_amount'=>$api_amount, 'total_tax_amount'=>0 ], [ 'name'=>$product_name2, 'quantity'=>1, 'unit_price'=>$api_amount2, 'tax_rate'=>0, 'total_amount'=>$api_amount2, 'total_tax_amount'=>0 ] ], "intent"=>"buy" ]; Any ideas please? Thanks!
-
Query help - looking for members of two different groups
simonp replied to simonp's topic in MySQL Help
Thanks so much Barand - that works a treat. Would never have worked it out myself Cheers -
Query help - looking for members of two different groups
simonp replied to simonp's topic in MySQL Help
Hi gents, Thanks so much for your replies but sadly that doesn't work as it gives me everyone who is a Member of group 7 OR group 8 and I need to know who is in both group 7 AND group 8 (many people have multiple roles). Any ideas? Cheers -
Hello, We have a (complicated!) Drupal database in which users can be assigned multiple roles (member, leader, coordinator, etc) I have a query to get info about all our members (users_roles.rid = 7) but I need to get a list of people who are members AND leaders (users_roles.rid = 8 ) but this doesn't work: SELECT users.uid, users.`name`, users.mail, users.created, users_roles.rid, field_data_field_first_name.field_first_name_value, field_data_node_venue_region.node_venue_region_tid FROM users INNER JOIN users_roles ON users.uid = users_roles.uid INNER JOIN field_data_field_first_name ON field_data_field_first_name.entity_id = users.uid INNER JOIN field_data_node_venue_region ON field_data_node_venue_region.entity_id = users.uid WHERE users_roles.rid = 7 and users_roles.rid = 8 Any advice appreciated! Thanks.
-
That's brilliant - thanks guys!
-
I'm trying to recreate the CSS for the form textfields and also the submit button used on this page: https://outdoorlads.com/user/register (ie the rounded corner text boxes and the red rounded corner submit button) I've tried trying to find these using page source in Safari with little success. Any help appreciated whilst I'm still getting to grips with CSS Thanks!
-
Thanks so much requinx - that's really helpful. I'd got so close but didn't quite master the [0] part!
-
Hi, I've got this JSON output: {"result":"success","clientid":null,"serviceid":null,"pid":null,"domain":"testdomain.com","totalresults":"1","startnumber":0,"numreturned":1,"products":{"product":[{"id":"3804","clientid":"1401","orderid":"3276","pid":"53","regdate":"2010-02-14","name":"Basic","groupname":"Plans","domain":"testdomain.com","dedicatedip":"","serverid":"4","servername":"serverx.com","serverip":"123.123.123.123","serverhostname":"","firstpaymentamount":"7.99","recurringamount":"7.99","paymentmethod":"wibble","paymentmethodname":"Credit\/Debit Card","billingcycle":"Monthly","nextduedate":"2010-02-14","status":"Terminated","username":"dcdqw","password":"z1nmY1p4Y9","subscriptionid":"","promoid":"0","overideautosuspend":"","overidesuspenduntil":"0000-00-00","ns1":"","ns2":"","assignedips":"","notes":"","diskusage":"0","disklimit":"1000","bwusage":"0","bwlimit":"50000","lastupdate":"2015-05-01 06:01:17","customfields":{"customfield":[{"id":"36","name":"ThisUserID","value":"1243214"}]},"configoptions":{"configoption":[]}}]}} ... and I'm trying to get the value for ThisUserID but I'm struggling so much with the arrays! I've copied it into http://jsonviewer.stack.hu so I can understand it more but just can't get that value. I understand: $clientid = $arr->clientid; ... but can't work out how to drill deeper. Any help appreciated
-
Thanks folks. Apologies for the rookie coding errors - it's been a while I kept it simple and went with: // Assign plan_id if ($plan == "53") { $plan_id = "2"; } elseif ($plan == "54") { $plan_id = "3"; } elseif ($plan == "55") { $plan_id = "4"; }
-
Hi, I want to set a variable based on the contents of another variable - I think I've see CASE used for this before but not entirely sure. Basically I'm trying to tidy this up: if ($var1 = "1") { $var2 = "a" } if ($var1 = "2" ) { $var2 = "b" } if ($var1 = "3") { $var2 = "c" } Any help appreciated. Thanks.
-
Hi, I need the HTML on my page to start right up against the left hand side of the page - currently (with no formatting) it indents it a little. Any ideas how to get around this? Cheers Simon
-
Cheers AlexWD, Unfortunately now it displayed the text escaped eg: Any tips? Simon
-
Hi, In my MySQL db, I have sentences like: Dave's cat is called Flossy But the apostrophe is causing problems with my script - is there something I need to do when I get the data from the db to fix this? Cheers Simon
-
Thanks - I was so close - I tried: echo $xml->geonameS->countryName; Thanks again. Simon