【新手求助】插表问题

print_er print_er 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
$query11 = "select last_insert_id()";
$result11 = mysql_query($query11);
$row = mysql_fetch_row($result11);
$id = $row[0];
$user = "xxx";
$type = "yyy";
$time = date("Y-m-d H:i:s");
echo "<p>$id | $user | $type | $time</p>";

/*
到这为止 输出正常
这是输出
41 | xxx | yyy | 2012-08-18 14:56:43
*/

$query2 = "insert into finding values($id, $user, $type, $time)";
$result2 = mysql_query($query2);

紧接着的这两句执行之后怎么也插不到finding表中,
如果只插字符串可以,比如说$query2 = "insert into finding values($id, 'xxx', 'yyy', '2000-00-00 00:00:00')";
之后mysql_query($query2);没问题
求助各路大神!

这是表结构

+-------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+-------+
| id | int(8) | NO | PRI | NULL | |
| user | varchar(4) | NO | | NULL | |
| type | varchar(40) | NO | | NULL | |
| time | datetime | NO | | NULL | |
+-------+-------------+------+-----+---------+-------+
...全文

相关推荐

新手求助RBF神经网络数据预测问题-数据.xls

新手求助RBF神经网络数据预测问题-数据.xls 本程序用前六个数据预测下一数据,前200组数据用于训练,用后80组数据进行预测,可预测结果为一个值,请大家指教: 源程序为: clc clear close all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %每五个数据整合, x=xlsread; n=length m=5; sum=0; j=1; x1=zeros); for k=1:m:n     for i=k:         sum=sum x;     end     x1=sum;     j=j 1;     sum=0; end j t=1:; figure plot;%,'d-m' hold on; grid on title; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %归一化处理 [x2,mint,maxt] = premnmx figure plot;%,'d-m' hold on; grid on title; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %输入数据 for k=1:1:200     p_train=[x2 x2 x2 x2 x2 x2]; 5*6     t_train=x2; 5*1 end     p_train=p_train'; %6*195     t_train=t_train'; %1*195 for z=1:1:81     p_test=[x2 x2 x2 x2 x2 x2];     t_test=x2; end      p_test=p_test';      t_test=t_test'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %建立 RBF 网络                      goal = 0.0001;                     % 训练误差的平方和 spread = 0.01;                     % 此值越大,需要的神经元就越少 MN = size;              % 最大神经元数 DF = 1;                            % 显示间隔 net = newrb; data_out=sim p_mse=mse figure plot hold on plot title; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %预测并作图 y=sim y_mse=mse figure plot; hold on; plot title; legend;

weixin_39841365

新手求助RBF神经网络数据预测问题-历史开奖数据.xlsx

新手求助RBF神经网络数据预测问题-历史开奖数据.xlsx 本程序用前六个数据预测下一数据,前200组数据用于训练,用后80组数据进行预测,可预测结果为一个值,请大家指教: 源程序为: clc clear close all %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %每五个数据整合, x=xlsread; n=length m=5; sum=0; j=1; x1=zeros); for k=1:m:n     for i=k:         sum=sum x;     end     x1=sum;     j=j 1;     sum=0; end j t=1:; figure plot;%,'d-m' hold on; grid on title; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %归一化处理 [x2,mint,maxt] = premnmx figure plot;%,'d-m' hold on; grid on title; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %输入数据 for k=1:1:200     p_train=[x2 x2 x2 x2 x2 x2]; 5*6     t_train=x2; 5*1 end     p_train=p_train'; %6*195     t_train=t_train'; %1*195 for z=1:1:81     p_test=[x2 x2 x2 x2 x2 x2];     t_test=x2; end      p_test=p_test';      t_test=t_test'; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %建立 RBF 网络                      goal = 0.0001;                     % 训练误差的平方和 spread = 0.01;                     % 此值越大,需要的神经元就越少 MN = size;              % 最大神经元数 DF = 1;                            % 显示间隔 net = newrb; data_out=sim p_mse=mse figure plot hold on plot title; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %预测并作图 y=sim y_mse=mse figure plot; hold on; plot title; legend;

weixin_39841848

牛顿插值多项式插商表各阶插商值计算代码

比计算器好用,而且方便,代码简单,主要是用C++语言编写

huitonglin

新手求助第二次输入数据怎么让switch函数重新确定-geshui.fig

新手求助第二次输入数据怎么让switch函数重新确定-geshui.fig 各位大神,我是新手,自学matlab,编写了一个计算个税缴纳的计算器GUI,来熟悉matlab的函数。 思路是输入应发工资、公积金抵税额、五险一金,输出交税额、实发工资。 其中,应发工资、公积金抵税额是edit直接输入,五险一金提供了两种方法,第一种是直接输入总额,第二种是输入缴费基数、缴费比例,计算得到。 这两种方式通过radio button二选一来选择,分别为选项一、选项二。设置一个计算button,现在遇到的问题有两个,如下: 1、运行GUI后,输入应发工资、公积金抵税额,五险一金总额,radio默认是五险一金总额计算方法,点击计算button,不能输出结果到edit。须点选项二radio button,再点击选项一radio button,计算才能输出结果。 2、第一次计算后,修改五险一金总额edit数值,点击计算button,输出结果不改变。但是修改公积金抵税额edit数值,点击计算button,可以正常计算。 请教大神,这两个问题如何解决?

weixin_39841856

先删后插解决问题

先删后插解决问题 ,树上保存的 数据需要先删除后插入

duguo1982
评论 4
收藏 已收藏
分享
返回顶部
print_er
基础编程 21,889 成员 140,329 内容