0

I am trying to translate the PHP script into Java. If anything please advise what or how this translates?

PHP:

if(isset($_GET['getClientId'])){  
  $res = mysql_query("select * from tableOne where clientID='".$_GET['getClientId']."'") or die(mysql_error());
  if($inf = mysql_fetch_array($res)

...

My attempt in Java and it is giving me errors with getClientId part and lost in fetching array part.

//db connection part here...

try {
String res = "";
if(getParameter("getClientId")) {
   res = stmt.executeQuery("select * from tableOne where clientID='" + getParameter("getClientId") + "');
  
String $inf []; 
if($inf.equals(getParameterValues($res)) {

....
3
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by nav33n
0

are you wanting us to translate it into java for you or just explain what the php is doing so you can make it into java.

0

are you wanting us to translate it into java for you or just explain what the php is doing so you can make it into java.

I tried translating it to Java and its not working. I am trying (in Java) to take the results and return it as an array, where each field of the row is in an array key.

Please correct my translation attempt in Java if possible.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.