Thread: Problem using PQgetvalue()
Hi I am using PQgetvalue() function in c to get the value of a field like<br /><br /> PQgetvalue(result,0,2)<br /><br />but the program outputs following<br /><br />"column number 2 is out of range 0..0"<br /><br /> Can someone tell me howcan I get this field and whats wrong?<br /><br /> Thanks<p><hr size="1" />Ahhh...imagining that irresistible "new car"smell?<br /> Check out <a href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new carsat Yahoo! Autos.</a>
MicazMAK <emoazzam@yahoo.com> writes: > Hi I am using PQgetvalue() function in c to get the value of a field like > PQgetvalue(result,0,2) > but the program outputs following > "column number 2 is out of range 0..0" > Can someone tell me how can I get this field and whats wrong? Your result doesn't actually have three columns --- apparently it has just one. Better check which query you were issuing. regards, tom lane