Forum Moderators: coopster

Message Too Old, No Replies

PHP to JAVA

         

fotiss13

10:22 am on Jul 28, 2004 (gmt 0)

10+ Year Member



Hi,
Anyone has a link that can help me to convert php commands in Java? i am connecting to a mysql database and i need commands for the queries. Mostly, i have problems with commands such:
if (mysql_num_rows($result12)!=0 && $result12!=0)

Thank you

jollymcfats

3:41 pm on Jul 28, 2004 (gmt 0)

10+ Year Member



Java JDBC and PHP native db access are quite different beasts. They both do the same thing, but in Java land you will generally need to write much more code to get the same result. I think it might be difficult to find a simple 1:1 conversion guide.

There is JDBC coverage in many general Java books, but the "JDBC API Tutorial and Reference" is a pretty clear guide with decent code examples. O'Reilly has this title online in their Safari web-book service- instant gratification, plus you can cut-and-paste the code samples. :)

fotiss13

10:04 am on Jul 29, 2004 (gmt 0)

10+ Year Member



thanx, i found the solution. Its more simple than i thought. The code that i was asking is just a simple while(resultSet.next())