search

Home  >  Q&A  >  body text

Unable to insert data.

var_dump($num); The result is boolean false
You can insert it by executing the sql statement directly in the database. php.ini expands normally.


1111.png

怪我咯怪我咯1812 days ago1621

reply all(7)I'll reply

  • 王先生

    王先生2019-12-12 11:10:00

    Actually, there is no problem. I just missed a field. Look at what you wrote, are there any details that you didn’t notice

    reply
    0
  • 怪我咯

    怪我咯2019-12-12 10:28:54

    What do you think is the reason? This is really strange.

    reply
    0
  • 王先生

    王先生2019-12-12 10:26:59

    You didn't find the root cause. I have the same problem and I didn't find the root cause either. CamelCase variable naming has no effect at all. Mine cannot be inserted normally if the $createTime parameter is added. If the content of this field is not inserted, it can be inserted normally

    reply
    0
  • 怪我咯

    I only used username and password and no other fields.

    怪我咯 · 2019-12-12 10:30:20
  • 怪我咯

    怪我咯2019-12-04 20:25:03

    Camel case naming is not supported. Variable names can only be in lowercase. For example, it is not possible to write $dbtype as $dbType. What is the reason?


    toufeng.png

    reply
    0
  • 怪我咯

    怪我咯2019-12-04 14:21:36

    $dsn="{$dbtype}:host={$host};dbname={$dbname}";

    Finally found the reason. There can't be any spaces in it. It doesn't work if there are spaces.

    reply
    0
  • 怪我咯

    怪我咯2019-12-04 00:00:32

    PDO related information

    2222.png

    reply
    0
  • Cancelreply