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 = C, When piping in input getchar() doesn't work, what to do? (UNIX)? - 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: 1
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2010, 09:14 AM
Tomas Tomas is offline
Junior Member
 
Join Date: Jan 2010
Posts: 2
Default

C, When piping in input getchar() doesn't work, what to do? (UNIX)?


C, When piping in input getchar() doesn't work, what to do? (UNIX)?

When I execute my program with a pipe input it fails:

echo /avr/prj/blink | ./buildconvupload

the line of code, userOption = getchar();
doesn't work. I used gdb to check why, and it turns out that when I pipe an input in my program getchar() only reads in -1 and loops. But executing my program without a pipe input works fine.

Is it because piping in redirects the input and prevents the user from inputing a character into getchar()? If so how would I make this work?
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
Question about piping in unix, pretty basic!? bob UNIX 0 01-29-2010 03:08 PM
how do i get input in unix and use it as an argument...? Cleo UNIX 1 11-03-2009 01:48 AM
(unix/c++) c++ program with input file? sookles UNIX 2 04-21-2009 04:53 PM
unix- how to only take in one input parameter? yourmumisone UNIX 0 04-08-2009 11:44 AM
UNIX commands, redirection, piping? ageoftvb UNIX 0 02-13-2009 04:20 AM

Your Ad Here

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