The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
insert function HELP
I have a function to comment and rate photos.
It should insert the comment into the comment table in the DB. when i check it in the table, the comment-text and user_id are correctly inserted, but the photo_id is 0. (see screenshot) Can someone help me with this? Thank you very much The function is the following: Quote:
|
#2
|
||||
|
||||
Set the photo_id field as an auto incrementing primary key
|
#3
|
|||
|
|||
comment_id is the key.
photo_id cannot be autoincrementing. |
#4
|
||||
|
||||
You really should not be using the $GLOBALS array in PHP. It's a poor way of accessing your variables.
|
#5
|
|||
|
|||
I don't know how else to do it.
|
#6
|
||||
|
||||
Well, using globals is generally bad practice. You should pass in your objects to the function as parameters, and use them like that
|
#7
|
|||
|
|||
sorry, but i am unable to do this. i'm just glad if one way works..
|
#8
|
||||
|
||||
Well you're leaving yourself open to security risks. Incompetence is no excuse for lack of security my friend Security, education first. Code second...
|
#9
|
|||
|
|||
you're welcome to code it for me.
|
#10
|
|||
|
|||
Dean's time (and many coders for that matter) is probably more expensive than the time it takes to learn the foundations of programming and security and then applying it to your code.
I agree with Dean, if you want to learn how to code, take his advice. If you are under a rush or a deadline, you can hire a coder to do it properly. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|