The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
db error
I just got the following error while trying to send a private message. Can someone please tell me what is happening here and maybe how to fix it?
Quote:
|
#2
|
||||
|
||||
look at the end: "0,1,0,)"
you hav a , where it shouldn't be |
#3
|
||||
|
||||
No matter who tries to send a pm, they get a db error now. Here's the code in question:
Code:
$DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title,message,dateline,showsignature,iconid,messageread,folderid,receipt,attachmentid,showimage) VALUES (NULL,$touserinfo[userid],$touserinfo[userid],$bbuserinfo[userid],'".addslashes(htmlspecialchars($title))."','".addslashes($message)."',".time().",'$signature','$iconid',0,0,$receipt,$attachmentid,$showimage)"); |
#4
|
||||
|
||||
seems the showimage makes problems..
change it to: PHP Code:
|
#5
|
||||
|
||||
I did this and it now seems to work. But is this the right way to do it or should I change it to what you have in the post abaove?
PHP Code:
|
#6
|
||||
|
||||
no it doesn't matter where in the string it is...
well, your and my query are different. yours hasn't the hack in anymore, mine would work with the hack (whichone it ever was?) so if you don't need the hack yours is correct, if it's a needed hack you should use mine |
#7
|
||||
|
||||
The hack is still in there. I moved it behind showsignature and '$signature'. All I did was change $showimage to '$showimage' and it started working. What I was asking is am I going to have problems somewhere else with that change? What does ".intval($showimage)." do that '$showimage' doesn't do, or vice-versa?
|
#8
|
||||
|
||||
well it depends on how you save the value in the db.
lets say $showimage is an empty string, then '$showimage' would become '', intval($showimage) would become that: 0 so if you save in the db as integer, you should use intval |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|