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 = Delphi question? - iTechForums
Login
Search
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: 3
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 05-07-2008, 08:43 AM
myfiles123 myfiles123 is offline
Junior Member
 
Join Date: May 2008
Posts: 7
Default

Delphi question?


Help! I need help on how to do this on pascal or delphi. I need to make the following:
if this is greater than this but not smaller then this then do this.

You know, that's a real life example. Not actual programming or:

if x > 1 "but" < 20 then ShowMessage('Ok');

Thank You very much, please tell me how to do this!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 05-07-2008, 08:52 AM
General Cucombre General Cucombre is offline
Junior Member
 
Join Date: May 2008
Posts: 8
Default

if (x>1) and (x<20) then ShowMessage('Ok');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 05-07-2008, 08:53 AM
irongut irongut is offline
Junior Member
 
Join Date: May 2008
Posts: 4
Default

Your question is very confused. If a variable is greater than 1 and not smaller than 20 then it will also be greater than 20. That is not what you've written in your pseudocode.

The answer for what you have asked in english is:

if (x >1) and (x>20) then ShowMessage('Ok');

Which given these values could be simplified to:

if (x>20) then ShowMessage('Ok');

The answer for what you have written in pseudocode is:

if (x >1) and (x<20) then ShowMessage('Ok');
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

Your Ad Here

All times are GMT. The time now is 02:46 AM.