The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SQL query inserting extra parentheses?
I'm trying to insert some data in the db, but the below query inserts it with parentheses. Any other combination I try, even taking off all parentheses just results in a query error. What am I doing wrong?
Code:
$db->query_read("INSERT INTO picks_groups (group_title) VALUES ('$db->escape_string($event_name)')"); |
#2
|
||||
|
||||
To call a function you need to break out of the double quotes like so,
PHP Code:
Another (easier to read / write for some, but not necessarily better) method is this: PHP Code:
|
#3
|
|||
|
|||
Thanks, what is the proper way to clean an array inside $_POST? So, $_POST['outcome'][]
|
#4
|
||||
|
||||
PHP Code:
|
#5
|
|||
|
|||
PHP Code:
|
#6
|
||||
|
||||
lol good catch
|
#7
|
|||
|
|||
Hehe, i was a bit surprised you did not catch that one, and even copied it to your improved code.
|
#8
|
|||
|
|||
Thanks, I had caught that yesterday after reading through some of the vBulletin developer tools material. Thanks for that answer Dismounted.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|