Translate attempt

Reply

Join Date: Nov 2007
Posts: 34
Reputation: chicago1985 is an unknown quantity at this point 
Solved Threads: 0
chicago1985 chicago1985 is offline Offline
Light Poster

Translate attempt

 
0
  #1
Jun 29th, 2008
I am trying to translate the PHP script into Java. If anything please advise what or how this translates?

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

My attempt in Java and it is giving me errors with getClientId part and lost in fetching array part.
  1. //db connection part here...
  2.  
  3. try {
  4. String res = "";
  5. if(getParameter("getClientId")) {
  6. res = stmt.executeQuery("select * from tableOne where clientID='" + getParameter("getClientId") + "');
  7.  
  8. String $inf [];
  9. if($inf.equals(getParameterValues($res)) {
  10.  
  11. ....
  12.  
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: Translate attempt

 
0
  #2
Jun 29th, 2008
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.
Last edited by kkeith29; Jun 29th, 2008 at 5:23 pm.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 34
Reputation: chicago1985 is an unknown quantity at this point 
Solved Threads: 0
chicago1985 chicago1985 is offline Offline
Light Poster

Re: Translate attempt

 
0
  #3
Jun 29th, 2008
Originally Posted by kkeith29 View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: Translate attempt

 
0
  #4
Jun 29th, 2008
sorry i don't know java. hopefully someone else will be able to help.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,749
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Translate attempt

 
0
  #5
Jun 30th, 2008
Umm.. wouldn't it be better if you post your question in Java forum ?
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC