Unknown Column ‘0’ in where clause
-
I am converting SQL to $wpdb. I get this error: `WordPress database error: [Unknown column ‘0’ in ‘where clause’]
UPDATEAAUW_Members
SETID
= 202205,Title
= ‘Dr.’,FirstName
= ‘Grace’,LastName
= ‘Hopper’,Address1
= ‘3114 Rittenhouse’,City
= ‘Washington’,State
= ‘DC’,Zip
= ‘10225’,HomePhone
= ‘845-236-7971’,CellPhone
= ‘845-236-5555’,Email
= ‘[email protected]’,College1
= ‘USNA’,College2
= ‘Cornell’,College3
= ‘Stanford’,Birth_Day
= ‘5’,Birth_Month
= ‘Feb’,Mem_Type
= ‘MOB’,Honorary
= ‘0’,Joined_Local
= ‘3/22/2022’,Joined_Natl
= ‘3/22/2022’,Mailings
= ‘Email’,Positions_Held
= ‘Developer’,Notes
= ‘Math Program for longrange artillery’,Referred
= ‘Howard Aiken’,Retired
= ‘Y’,Employer
= ‘USNA’,Occupation
= ‘Cobol developer’,Positions
= ‘taught at Vassar’,OtherWriteIn
= ‘Lecturer, Mentor’ WHERE0
= ‘%d’ AND1
= ‘%s’ AND2
= ‘%s’ AND3
= ‘%s’ AND4
= ‘%s’ AND5
= ‘%s’ AND6
= ‘%s’ AND7
= ‘%s’ AND8
= ‘%s’ AND9
= ‘%s’ AND10
= ‘%s’ AND11
= ‘%s’ AND12
= ‘%s’ AND13
= ‘%s’ AND14
= ‘%s’ AND15
= ‘%s’ AND16
= ‘%s’ AND17
= ‘%s’ AND18
= ‘%s’ AND19
= ‘%s’ AND20
= ‘%s’ AND21
= ‘%s’ AND22
= ‘%s’ AND23
= ‘%s’ AND24
= ‘%s’ AND25
= ‘%s’ AND26
= ‘%s’ AND27
= ‘%s’ AND28
= ‘%s’`
ID is an integer.$result_check = $wpdb->UPDATE('AAUW_Members', array( 'ID' => $ID, 'Title' => $Title, 'FirstName' => $FirstName, 'LastName'=> $LastName, 'Address1'=> $Address1, 'City'=> $City, 'State'=> $State, 'Zip'=> $Zip, 'HomePhone'=> $HomePhone, 'CellPhone'=> $CellPhone, 'Email'=> $Email, 'College1'=> $College1, 'College2'=> $College2, 'College3'=> $College3, 'Birth_Day'=>$Birth_Day, 'Birth_Month'=>$Birth_Month, 'Mem_Type' =>$Mem_Type, 'Honorary' =>$Honorary, 'Joined_Local'=>$Joined_Local, 'Joined_Natl' =>$Joined_Natl, 'Mailings' =>$Mailings, 'Positions_Held'=>$Positions_Held, 'Notes'=>$Notes, 'Referred'=>$Referred, 'Retired'=>$Retired, 'Employer'=>$Employer, 'Occupation'=>$Occupation, 'Positions'=>$Positions, 'OtherWriteIn'=>$OtherWriteIn ), array( '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) );
The page I need help with: [log in to see the link]
- The topic ‘Unknown Column ‘0’ in where clause’ is closed to new replies.