Egor Kotov6832188
Posts: 0
Joined: Wed Nov 19, 2014 5:15 pm

Database if else query help

Hello Bill,
try next code:
var found = false;
for (var i=0;i is last service you are trying to call, place exact name, cause it case sensitive.

Bill7270109
Posts: 0
Joined: Wed Dec 10, 2014 4:08 pm

Database if else query help

Thanks Egor

We feel stupid but we just can not figure out what you mean. Can you please provide an example? Lets say this is the code and below that is the service.

for (var i=0;i);
}
}

group_Item_Add

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Database if else query help

Hi Bill -

Sorry, looks like the code from Egor was corrupted.

try next code:
precode
var found = false;
for (var i=0;i<data&#46;length;i++) {
if (data&#46;groupID == localStorage&#46;getItem("groupid")){
alert ("Your ID was successfully registered Please Share");
found = true;
}
}

if (!found) {
service_name&#46;execute({});
}/code/pre

where 'service_name' is last service you are trying to call, place exact name, cause it case sensitive.

Bill7270109
Posts: 0
Joined: Wed Dec 10, 2014 4:08 pm

Database if else query help

Thank You

That would explain why we were going crazy trying to get it to work. Even though it was time consuming trying to get Egor's code to work.. It was a win win. In trying to figure out what we were doing wrong with the corrupted code we learned a ton. Plus the new code worked perfect in the end,

Thank you all for your support. Considering this is a free and you probably get frustrated with us newbies asking these questions all of the time. you all do a fantastic job.

Bill and Bob

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Database if else query help

Hello Bill and Bob,

Thank you for the update and for the kind words. Please do not hesitate to contact us if you'll need any help.

Return to “Issues”