MySQL 1046 error solution:
<? PHP
Require_once './include/common. inc. php ';
$ Maxpostnum = 200; // sets the minimum number of posts.
If (! $ Discuz_user |! $ Discuz_pw ){
Showmessage ('Sorry, you have not logged on. You cannot perform this operation. ');
}
If (! $ Adminid ){
$ Query = $ db-> query ("SELECT postnum, credit FROM bbs. cdb_members WHERE username = '$ discuz_user '");
$ BlogAccess = $ db-> fetch_array ($ query );
If ($ blogaccess ['postnum'] <$ maxpostnum ){
Showmessage ('Sorry, you have not activated the RSS aggregation Service ');
}
}
$ Query = $ db-> query ("SELECT username FROM uploader. uploader_users WHERE username = '$ discuz_user '");
$ Bloguser = $ db-> fetch_array ($ query );
If ($ action = ""){
Include template ('rss _ reg ');
}
If ($ action = "kaihu "){
If (! $ Bloguser ['user']) {
$ Query = $ db-> query ("SELECT uid, username, password, email, regdate FROM bbs. cdb_members WHERE username = '$ discuz_user '");
$ Bloginfo = $ db-> fetch_array ($ query );
$ Db-> query ("insert into uploader. uploader_users (username, password, email, reg_date)
VALUES ('$ bloginfo [username]', '$ bloginfo [password]', '$ bloginfo [email]', '$ bloginfo [regdate]' ");
$ Db-> query ("UPDATE bbs. cdb_members SET rss = 1 WHERE username = '$ discuz_user '");
Showmessage ('after the account is activated, you can go to manage ', 'HTTP: // rss. twbbs. biz ');
} Else {
$ Db-> query ("UPDATE bbs. cdb_members SET rss = 1 WHERE username = '$ discuz_user '");
Showmessage ('your account has been activated ', 'HTTP: // rss. twbbs. biz ');
}
}
?>
SQL: INSERT INTO uploader. uploader_users (username, password, email, reg_date)
VALUES ('sa ', '40c76244e235aa23e73acb4a457f9748', 'sa @ gmail.com ', '123'
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL Server version for the right syntax to use near ''at line 2
Errno.: 1064
Do I have to insert the uploader_users id according to the ID of bbs. cdb_member member failed?
Solution:
Set
PHP code:
$ Db-> query ("insert into uploader. uploader_users (username, password, email, reg_date)
VALUES ('$ bloginfo [username]', '$ bloginfo [password]', '$ bloginfo [emal]', '$ bloginfo [regdate]' ");
Replace:
PHP code:
$ Db-> query ("insert into uploader. uploader_users (username, password, email, reg_date)
VALUES ('$ bloginfo [username]', '$ bloginfo [password]', '$ bloginfo [emal]', '$ bloginfo [regdate]') ");
Cause: an angle bracket is missing.
At this point, the 1046 error in the mysql database is basically solved. I hope you can learn how to solve the error in the mysql database, I believe this is very helpful for your future work.