0

だから、私はこれを持っています:

$newModel = "UPDATE models SET firstname=" . PrepSQL($firstname) . ", lastname=" . PrepSQL($lastname) . ", email=" . PrepSQL($email) . ", password=" . PrepSQL($password) . ", \"group\"=" . PrepSQL($group) . ", phone=" . PrepSQL($phone) . ", timeofday=" . PrepSQL($timeofday) . ", dayofweek=" . PrepSQL($dayofweek) . ", address=" . PrepSQL($address) . ", city=" . PrepSQL($city) . ", state=" . PrepSQL($state) . ", zip=" . PrepSQL($zip) . ", gender=" . PrepSQL($gender) . ", hair=" . PrepSQL($hair) . ", eye=" . PrepSQL($eye) . ", birthday=" . PrepSQL($birthday) . ", birthmonth=" . PrepSQL($birthmonth) . ", birthyear=" . PrepSQL($birthyear) . ", bustshirt=" . PrepSQL($bustshirt) . ", cup=" . PrepSQL($cup) . ", waist=" . PrepSQL($waist) . ", hips=" . PrepSQL($hips) . ", weight=" . PrepSQL($weight) . ", inches=" . PrepSQL($inches) . ", dressjacket=" . PrepSQL($dressjacket) . ", workxp=" . PrepSQL($workxp) . ", twitter=" . PrepSQL($twitter) . ", facebook=" . PrepSQL($facebook) . ", joindate=" . PrepSQL($joindate) . ", instagram=" . PrepSQL($instagram) . ", imdb=" . PrepSQL($imdb) . ", parentid=" . PrepSQL($parentid) . ", ethnicity=" . PrepSQL($ethnicity) . ", error='' WHERE id=" . $inserted_id;

解釈すると、次のようになります。

UPDATE models SET firstname='This', lastname='Person', email='rbross3333@gmail.com', password='gwpmgca8', "group"='1', phone='1234123412', timeofday='', dayofweek='', address='1234 Fictional', city='City', state='AL', zip='12345', gender='1', hair='blonde', eye='', birthday='08/06/1993', birthmonth='', birthyear='', bustshirt='', cup='', waist='12', hips='12', weight='12', inches='', dressjacket='12', workxp='', twitter='', facebook='', joindate='2013-09-04 17:11:34', instagram='', imdb='', parentid='', ethnicity='african-american', error='' WHERE id=346"

解釈されたクエリをここに置くと:

http://developer.mimer.com/validator/parser200x/index.tml#parser

検証します。

phpmyadmin に直接入れると、次のようになります。

ここに画像の説明を入力

groupでは、フィールド名(「グループ」?)を適切に渡すにはどうすればよいでしょうか?

4

1 に答える 1