DB Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

SELECT * FROM `user` the_table WHERE the_table.userid = DB Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2

SELECT * FROM `user` the_table WHERE the_table.userid = Given the following JSP page:? - iTechForums
Login
Search   Moderators Wanted: If you're interested please send your portfolio to info[at]itechforums.com
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 4
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 04-26-2009, 10:32 AM
Master of Puppets Master of Puppets is offline
Junior Member
 
Join Date: Apr 2009
Posts: 3
Default

Given the following JSP page:?


Given the following JSP page:?

<html>
<head>
<title>Question 45</title>
</head>
<body>
<%!
String methodA() { return methodB(); }
%>
<%
String methodB() { return “Question 45”; }
%>
<%= methodA() %>
</body>
</html>
What would be the result of trying to access the page?

a) ‘Question 45’ is output by the resulting web page.

b) A page translation error occurs.

c) A runtime error occurs.

d) The resulting web page is blank.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2  
Old 04-26-2009, 11:04 AM
DeaDeye DeaDeye is offline
Junior Member
 
Join Date: Apr 2009
Posts: 1
Default

I don't know much about JSP, but seeing methodB() being after methoadA while methodA is trying to call methodB, it wont' be able to find it, and thus you'll end up getting a runtime error, C.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 04-26-2009, 11:30 AM
Blackcompe Blackcompe is offline
Member
 
Join Date: May 2008
Posts: 66
Default

methodB() isn't between declaration tags (<%!). A translation error will occur.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 04-26-2009, 11:38 AM
spyman1o1 spyman1o1 is offline
Junior Member
 
Join Date: Apr 2009
Posts: 1
Default

Uhm, would be "b"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP script to display MySQL Query results page by page? Cathy V MySQL 1 03-29-2009 07:11 PM
How to print full page length of a php generated web page table? mortal PHP 0 11-05-2008 08:34 PM
Using MS Word template to create mailing labels. Can't move from page 1 to page 2!... travel guy Web Templates 0 07-07-2008 01:28 PM
i cannot access my yahoo mail error on page ,web page cannot be displayed java... mala n Web Scripts 1 05-06-2008 05:03 PM
Where can I find out the sample login page and registration page coding in Jacko Java, Java Servlets & JSP 1 05-06-2008 04:31 PM

Your Ad Here

All times are GMT. The time now is 03:39 AM.