Jump to content
Larry Ullman's Book Forums

Recommended Posts

I have query in PHP as follows:

<code>

            $query="update tblClients SET GivenName1='$GivenName1',
                                          GivenName2='$GivenName2',
                                          PreferredName='$PreferredName',
                                          Surname='$Surname',
                                          DoB='$DoB',
                                          Gender='$Gender',
                                          PlaceOfBirth='$PlaceOfBirth',
                                          Address1='$Address1',
                                          Address2='$Address2',
                                          Suburb='$Suburb_id',
                                          Phone='$Phone',
                                          Source='$Source',
                                          ReferredBy='$ReferredBy',
                                          email='$Email',
                                          OptOut='$OptOut',
                                          WrongAddress='$WrongAddress',
                                          Campus='$Campus',
                                          FirstContact='$FirstContact',
                                          Merde='$Merde',
                                          Inactive='$Inactive',
                                          CRN='$CRN',
                                          AdmissionPack='$AdmissionPack',
                                          AdmissionProcedure='$AdmissionProcedure',
                                          AdmittedBy='$AdmittedBy',
                                          ResidencyContract='$ResidencyContract',
                                          ContractSigned='$ContractSigned',
                                          ContractWitnessed='$ContractWitnessed,
                                          DateContractSigned='$DateContractSigned',
                                          KeyDepositReceived='$KeyDepositReceived',
                                          KeyDepositRefunded='$KeyDepositRefunded',
                                          ReceiptDate='$ReceiptDate',
                                          RefundDate='$RefundDate',
                                          PreviousClient='$PreviousClient',
                                          PreviousCampus='$PreviousCampus',
                                          PreviousAdmission='$PreviousAdmission'
                                   where (ID='$ClientID');";

</code>

The problem is that when I echo the query to the screen, copy it and paste it into the command line of MySQL it returns what looks like:

     '>

Any suggestions?

Link to post
Share on other sites

All fields are correct as are the data types.

The code being sent is as follows:

update tblClients

SET

GivenName1='Susanna',

GivenName2='Anastasia',

PreferredName='Susie',

Surname='Barishnakov',

DoB='1995-10-25',

Gender='Female',

PlaceOfBirth='',

Address1='',

Address2='',

Suburb='8836',

Phone='',

Source='',

ReferredBy='',

email='',

OptOut='0',

WrongAddress='0',

Campus='2',

FirstContact='2012-10-25',

Merde='0',

Inactive='0',

CRN='',

AdmissionPack='0',

AdmissionProcedure='0',

AdmittedBy='',

ResidencyContract='0',

ContractSigned='0',

ContractWitnessed='0,

DateContractSigned='0000-00-00',

KeyDepositReceived='0',

KeyDepositRefunded='0',

ReceiptDate='2012-10-25',

RefundDate='0000-00-00',

PreviousClient='0',

PreviousCampus='2',

PreviousAdmission='0000-00-00'

where (ID='23');

 

But still I get '> as a response.

Link to post
Share on other sites

Hello,

 

Another typo:

ContractWitnessed='0,

The closing quotation mark is missing.

 

Also, if your ID is numeric, you should not quote it:

where (ID='23')

 

If this doesn't do the trick, I would suggest testing a few lines only at a time, until you find where the query goes wrong.

 

I hope this helps,

 

Emilie 

  • Upvote 3
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...