ogryn
asked on
Achieiving the equivelent of PHPs mysql_result command in JSP
Hello,
How would I go about getting the same result as PHP's:
$query = mysql_query("SELECT * FROM RUNNINGINSTANCE WHERE UNITLINK = $param");
$instancename1 = mysql_result($query,0,"nam e");
would in JSP?
Thanks
How would I go about getting the same result as PHP's:
$query = mysql_query("SELECT * FROM RUNNINGINSTANCE WHERE UNITLINK = $param");
$instancename1 = mysql_result($query,0,"nam
would in JSP?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No, it sets the first ? in the prepares statement :-)
rslt.next() gets the next (first in this case) row of the resultset ready, then you can read the "name" field out of it
rslt.next() gets the next (first in this case) row of the resultset ready, then you can read the "name" field out of it
ASKER
ahh, thanks. I'm a really newbie at Java stuff. I've been using JSTL, but I need to step it up a gear. I'll give that a go. Thanks
Hope it works :-)
http://java.sun.com/developer/qow/archive/73/index.html
Should help too :-)
Good Luck!
Tim
http://java.sun.com/developer/qow/archive/73/index.html
Should help too :-)
Good Luck!
Tim
ASKER
stmt.setString( 1, param ) ;