[thelist] PHP Newbie Stuck....

Sean Preston razorwise at yahoo.com
Fri Jun 1 14:03:08 CDT 2001


Okay Sandy, 

Third attempt to type this in.  I am new to PHP as well, but encountered this same error last
week.  It's a SQL thing.  You need to add ticks around your variable.  I verified this by taking
one of my queries and removing said ticks and got the same error.  

Therefore, I'd suggest you try this--->

$sql2 = "select * from CLIENTS where company_name = '$cname' ";


instead of this-->

$sql2 = "select * from CLIENTS where company_name = $cname";
 

Anthony Baratta clarified this for me in the following quote:  "Access will not accept SQL
commands that have numerical fields surrounded by ''. MS SQL will accept '' around almost
anything."

Please let me know if this works for you.  We newbies have to stick together!!!

Sincerely,

Sean Preston
  

=====
We can learn much from wise words, little from wisecracks, and less from wise guys.--William Arthur Ward

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




More information about the thelist mailing list