1. 在php中使用insert语句

创建了一个名为 "Persons" 的表,有三个列:"Firstname", "Lastname" 以及 "Age"。下面的例子向 "Persons" 表添加了两个新记录:

<?php
$con=mysql_connect("localhost","peter","abc123");
if(!$con)
{
die('Couldnotconnect:'.mysql_error());
}

mysql_select_db("my_db",$con);

mysql_query("INSERTINTOPersons(FirstName,LastName,Age)
VALUES('Peter','Griffin','35')");

mysql_query("INSERTINTOPersons(FirstName,LastName,Age)
VALUES('Glenn','Quagmire','33')");

mysql_close($con);
?>

2. php insert into语句一直不执行 为什么

$sql="INSERTINTO`shq`(`xu`,`mz`,`mima`,`reason`)VALUES('','$_POST[mz]','$_POST[mima]','$_POST[reason]')";
mysqli_query($sql);

3. PHP 中INSERT INTO 语句里面有个插入数据库的时候是空值,不知道怎么结局,求组!!!

echo "INSERT INTO my_town (townname) VALUES ('$vallx')";
如果有值,说明,字段的设置有问题。

4. php insert into使用方法,具体的

$sql ="insert into ceshi(name,password,email) values('$sname','$spass','$semial')";

5. php insert into语句出错

insert into pd_file2tag set tag_name="1",file_id="('13','12','11','10','9','8','7','5','4','3','2','1')"

注意单双引号的使用 。

update {$tpf}files set is_checked=1 where is_public=1 and file_id in ($file_str)

这个看不出来错误。
建议先echo 出SQL语句,再看看 。

6. PHP insert into错误

改下sql语句
INSERT INTO notebook (id,name,content) VALUES (null,'撒旦', 'dadasdas')

7. PHP insert into 求解此种数据插入方法

GetTable('remai'),这个应该是自定义的一种方法,用于获取表的字段数组,implode表示用“,”连接数组的各个单元,其结果就是tablename(列1,列2.。。。),所以说你加过字段size后,只要在values()中的对应位置加上size的值就可以了,GetTable('remai')会自动获取字段,

8. php中insert into语句怎么用,里面的参数代表什么求大神解答要详细的

你说的应该是sql语句吧
insert into 表名 (字段名1,字段名2, 字段名3。。。) values (字段1的值,字段2的值,字段3的值)
就是一个插入的sql语句。把相应的字段和要插入的值在两个括号里的位置对应好了,就没问题了。

9. php中insert into始终无法插入数据

有错误信息吗?有了放出来看看。

$sql="INSERT INTO moneytb (riqi,item,inout,cost,bz) VALUES ('$riqi','$item','$inout','$cost','$bz')";
这样写,然后在这句后面跟上echo $sql;
把sql语句打印出来看看是什么。
你也可以在mysql_query($sql)这句后面加一句or die(mysql_error());
看看报错不………………

10. php中insert into语句,插入没反应

if($_POST['submit']){

改成
if($_POST['enter']){

因为<input name="enter" value="确定" type="submit" />这句里的name是enter