Ben Hen

Greenhorn
+ Follow
since Mar 27, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ben Hen

I have 2 servers - a primary and a backup. When the first connection fails, how can I get it to try the second server?
dbServer1 = "server1";
dbServer2 = "server2";

My connection:



I've tried if (conn == null) but it doesn't work.

Thanks!
11 years ago
Yes - the if statement never finds a match, so nothing is printed. Thanks! I'll look into the equals() method.



THANK YOU!
12 years ago
Okay, another dumb question. Why does my if statement not find the match? There is a match. They're both strings, as far as I can tell...



This code returns nothing.
12 years ago
Greg - you jostled my memory - yes - it's



and that works.

Thanks, Bear. Sorry - I'm probably all over the place with the code. I don't usually touch the stuff, so I'm using what I can find or figure out. I'm developing a fairly simple API, and the dba won't let me use PHP.
12 years ago
I'm a PHP guy, and this is all new to me. The code below won't split my string on the pipe and I don't understand why.


Results:
Raw: 1234|5678|Ackada|Kim|kAckada@sod.com|kAckada - 3
Raw: 2222|3333|Abdullah|Marchall|mabdullah@sod.com|mabdullah - 2

It's treating stArray like a string rather than an array, returning the 2nd char instead of the 2nd element.

Why?

Thanks for helping a java dolt.
12 years ago