PHP MySQL插入无法正常工作 [英] PHP MySQL insert not working

查看:65
本文介绍了PHP MySQL插入无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉,如果这是一个非常简单的问题.我对网络语言不太了解.
基本上,这是行不通的.

Sorry if it's a quite simple problem. I am not too experienced with web languages.
Basically, it doesn't work.

$insert=
(
  "INSERT INTO phpbb_members ".
  "(emailAddress, uid, valid, firstandlast, propic, memberName) ".
  "VALUES ($me['email'], $uid, 1, $me['name'], $propic, $newuser)"
);
mysql_query($insert) or die('Error, insert query failed');

推荐答案

我认为问题可能出在您布置要插入的信息的方式上.

I think the problem may be in the way you've laid out the information to be inserted.

这应该有效:

$insert=("INSERT INTO phpbb_members (emailAddress, uid, valid, firstandlast, propic, memberName)
VALUES ('$me[email]', '$uid', '1', '$me[name]', '$propic', '$newuser')");
        mysql_query($insert) or die('Error, insert query failed');

希望有帮助!

我很确定要插入的信息必须在' '内部.

I'm pretty sure the information to be inserted has to be inside ' '.

这篇关于PHP MySQL插入无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆