我们可以在名为占位符的 pdo 中给出大写字母和下划线吗

发布于 2024-09-19 20:12:48 字数 3100 浏览 5 评论 0原文

我们可以在 PDO 命名占位符中给出大写字母和下划线吗? 以下是我的查询:

插入product_pepe(Type_Class, ID_别名、排序顺序_位置、 天前提醒, 下一次疫苗接种的天数, IsSitemapple_IsSitemappable, 没有后续疫苗接种, NoOfReminders_NoOfReminders, NoVaccinationsInPacket, RRP_RRP, 提醒间隔、发送提醒电子邮件、 发送提醒短信、特殊说明、 可见,List_price_AUD_gross, Daily_price_dependent,税级, 订单单位、价格数量、 最小订单数量、间隔订单、 参考_单位,参考_am, 产品中的金额、制造商、 制造商_产品_编号,重量_单位, 重量、长度、高度、宽度、 库存水平、最低库存水平、 交货期,Name_en, 描述_en、长描述_en、 keywords_en、IsNew、IsAvailable、 可用日期, 可用性Comment_en, IsBundleProduct、超级产品、 SelectedVariations,IsDefault, HasSubOwnPrices、ImageSmall、 图像中、图像大、图像HotDeal、 图片幻灯片显示字符串,大小, Metalicus 尺码、XXS_XL、欧洲尺码、 AusShoeSize,CLSShoeSize_CLS, SIZES_SizesXS_XL、SIZES_TTJS 尺寸、 CristinaRe_Envelopesize, CristinaRe_镇纸, CristinaRe_packorpersheet, Cristina_Re_DIY尺寸, Metalicus_Metalicus,EeniMeeniMini Moh_Color、FishLillyBibs_Sizes、 基本_颜色、基本_鞋码、 Basic_Sizeother2、Basic_toshihatsize、 Basic_Sizebymonth, Paperartzi_OobiSize, Paperartzi_Paperartzi, 颜色_SolidColors, 颜色_StripeColors, ToshiHats_hatsizes、Oobi_StripeColour、 Oobi_OtherColour、Oobi_BlockColour、 Oobi_OobiSize、Oobi_DressColour、 Oobi_MuslinDesigns、Oobi_Designs、 DieselShoeSize_ShoeSize, WillowFinn_尺寸, WalnutShoeSize_Shoesize, Bugaboo_BugabooColorBase, Bugaboo_BugabooColorTop, MiniminkSize_MiniminkSize, BuntingPattern_Pattern, Bedding_Bedding)值(:Type_Class, :ID_别名、:排序_顺序_位置、 :天前提醒, :下一次疫苗接种的天数, :IsSitemapple_IsSitemappable, :没有后续疫苗接种, :NoOfReminders_NoOfReminders, :NoVaccinationsInPacket, :RRP_RRP, :提醒间隔, :发送提醒电子邮件,:发送提醒短信, :特殊说明,:可见, :List_price_AUD_gross, :每日价格相关,:税级, :订单单位,:价格数量, :最小订单数量, :间隔顺序,:参考单位, :Reference_am, :Amount_in_product, :制造商, :制造商_产品_编号, :重量单位,:重量,:长度, :高度,:宽度,:库存水平, :最低库存水平,:交货期, :名称_zh,:说明_zh, :LongDescription_en, :Keywords_en, :是新的,:是可用的, :可用日期, :AvailabilityComment_en, :是捆绑产品,:超级产品, :选定的变体,:是默认的, :HasSubOwnPrices,:ImageSmall, :图像中,:图像大, :ImageHotDeal,:ImagesSlideShowString, :尺寸,:Metalicus尺寸,:XXS_XL, :欧洲尺码,:澳大利亚鞋码, :CLSShoeSize_CLS、:SIZES_SizesXS_XL、 :SIZES_TTJS尺寸, :克里斯蒂娜Re_信封大小, :克里斯蒂娜Re_镇纸, :CristinaRe_packorpersheet, :克里斯蒂娜_Re_DIY尺寸, :Metalicus_Metalicus, :EeniMeeniMini Moh_Color,:FishLillyBibs_Sizes, :基本_颜色,:基本_鞋码, :Basic_Sizeother2, :Basic_toshihatsize, :Basic_Sizebymonth, :Paperartzi_OobiSize, :Paperartzi_Paperartzi, :颜色_SolidColors, :颜色_StripeColors, :ToshiHats_帽子尺寸, :Oobi_StripeColour, :Oobi_OtherColour, :Oobi_BlockColour, :Oobi_OobiSize, :Oobi_DressColour, :Oobi_MuslinDesigns,:Oobi_Designs, :DieselShoeSize_ShoeSize, :WillowFinn_Sizes, :WalnutShoeSize_Shoesize, :Bugaboo_BugabooColorBase, :Bugaboo_BugabooColorTop, :MiniminkSize_MiniminkSize, :BuntingPattern_Pattern, :床上用品_床上用品)

及其给出以下错误:

Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in D:\Users\avinash\liveprojects\peperatzi\importData\import.php on line 56

这可能是什么原因?

Can we give capital letter and underscore in PDO named place holder.
Below Is my query:

insert into product_pepe (Type_Class,
ID_Alias, Sort_order_Position,
DaysBeforeReminder,
DaysForNxtVaccination,
IsSitemapple_IsSitemappable,
NoFollowUpVaccinations,
NoOfReminders_NoOfReminders,
NoVaccinationsInPacket, RRP_RRP,
RemindersInterval, SendReminderEmail,
SendReminderSMS, SpecialInstructions,
Visible, List_price_AUD_gross,
Daily_price_dependent, Taxclass,
Order_unit, Quantity_for_price,
Minimum_order_quantity, IntervalOrder,
Reference_unit, Reference_am,
Amount_in_product, Manufacturer,
Manufacturer_product_no, Weight_unit,
Weight, Length, Height, Width,
Stock_level, Minimum_stock_level,
DeliveryPeriod, Name_en,
Description_en, LongDescription_en,
Keywords_en, IsNew, IsAvailable,
AvailabilityDate,
AvailabilityComment_en,
IsBundleProduct, SuperProduct,
SelectedVariations, IsDefault,
HasSubOwnPrices, ImageSmall,
ImageMedium, ImageLarge, ImageHotDeal,
ImagesSlideShowString, Size,
Metalicussize, XXS_XL, EuroSize,
AusShoeSize, CLSShoeSize_CLS,
SIZES_SizesXS_XL, SIZES_TTJSize,
CristinaRe_Envelopesize,
CristinaRe_Paperweight,
CristinaRe_packorpersheet,
Cristina_Re_DIYsize,
Metalicus_Metalicus, EeniMeeniMini
Moh_Color, FishLillyBibs_Sizes,
Basic_Colours, Basic_Shoesize,
Basic_Sizeother2, Basic_toshihatsize,
Basic_Sizebymonth,
Paperartzi_OobiSize,
Paperartzi_Paperartzi,
Colors_SolidColors,
Colors_StripeColors,
ToshiHats_hatsizes, Oobi_StripeColour,
Oobi_OtherColour, Oobi_BlockColour,
Oobi_OobiSize, Oobi_DressColour,
Oobi_MuslinDesigns, Oobi_Designs,
DieselShoeSize_ShoeSize,
WillowFinn_Sizes,
WalnutShoeSize_Shoesize,
Bugaboo_BugabooColorBase,
Bugaboo_BugabooColorTop,
MiniminkSize_MiniminkSize,
BuntingPattern_Pattern,
Bedding_Bedding) values (:Type_Class,
:ID_Alias, :Sort_order_Position,
:DaysBeforeReminder,
:DaysForNxtVaccination,
:IsSitemapple_IsSitemappable,
:NoFollowUpVaccinations,
:NoOfReminders_NoOfReminders,
:NoVaccinationsInPacket, :RRP_RRP,
:RemindersInterval,
:SendReminderEmail, :SendReminderSMS,
:SpecialInstructions, :Visible,
:List_price_AUD_gross,
:Daily_price_dependent, :Taxclass,
:Order_unit, :Quantity_for_price,
:Minimum_order_quantity,
:IntervalOrder, :Reference_unit,
:Reference_am, :Amount_in_product,
:Manufacturer,
:Manufacturer_product_no,
:Weight_unit, :Weight, :Length,
:Height, :Width, :Stock_level,
:Minimum_stock_level, :DeliveryPeriod,
:Name_en, :Description_en,
:LongDescription_en, :Keywords_en,
:IsNew, :IsAvailable,
:AvailabilityDate,
:AvailabilityComment_en,
:IsBundleProduct, :SuperProduct,
:SelectedVariations, :IsDefault,
:HasSubOwnPrices, :ImageSmall,
:ImageMedium, :ImageLarge,
:ImageHotDeal, :ImagesSlideShowString,
:Size, :Metalicussize, :XXS_XL,
:EuroSize, :AusShoeSize,
:CLSShoeSize_CLS, :SIZES_SizesXS_XL,
:SIZES_TTJSize,
:CristinaRe_Envelopesize,
:CristinaRe_Paperweight,
:CristinaRe_packorpersheet,
:Cristina_Re_DIYsize,
:Metalicus_Metalicus, :EeniMeeniMini
Moh_Color, :FishLillyBibs_Sizes,
:Basic_Colours, :Basic_Shoesize,
:Basic_Sizeother2,
:Basic_toshihatsize,
:Basic_Sizebymonth,
:Paperartzi_OobiSize,
:Paperartzi_Paperartzi,
:Colors_SolidColors,
:Colors_StripeColors,
:ToshiHats_hatsizes,
:Oobi_StripeColour, :Oobi_OtherColour,
:Oobi_BlockColour, :Oobi_OobiSize,
:Oobi_DressColour,
:Oobi_MuslinDesigns, :Oobi_Designs,
:DieselShoeSize_ShoeSize,
:WillowFinn_Sizes,
:WalnutShoeSize_Shoesize,
:Bugaboo_BugabooColorBase,
:Bugaboo_BugabooColorTop,
:MiniminkSize_MiniminkSize,
:BuntingPattern_Pattern,
:Bedding_Bedding)

and its giving below error:

Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined in D:\Users\avinash\liveprojects\peperatzi\importData\import.php on line 56

what can be the reason for this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

森罗 2024-09-26 20:12:52

如果将该语句加载到语法感知编辑器中,您将立即发现这里存在问题:

:EeniMeeniMini Moh_Color,

您可能的意思是

:EeniMeeniMini_Moh_Color,

(Emacs 在暂存缓冲区中为我突出显示了它,因此语法感知并不是绝对必要的。)

If you load that statement into a syntax-aware editor, you'll immediately see that there's a problem here:

:EeniMeeniMini Moh_Color,

You probably meant

:EeniMeeniMini_Moh_Color,

(Emacs highlighted it for me in the scratch buffer, so syntax-awareness isn't strictly necessary.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文