vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Mysql error with attachments (https://vborg.vbsupport.ru/showthread.php?t=42631)

SpotMe 08-22-2002 09:29 PM

Mysql error with attachments
 
This is the error. Also, any idea why the wierd characters?

PHP Code:

Database error in vBulletin 2.2.6:

Invalid SQL: INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,visible,private) VALUES (NULL,1,1030054947,'raven.gif','GIF89a,%\0??\0cj?gu?4I?,D?.i=Q?R*>y???
![JU?
D??? !T M%ZKS?a U???4q&`Uc?3???[b? IZ]?
A!5p1l%8rQ^?:N?2F?%9u%;ysu?MX?)a!4nSZ?@Q?,e$5mI!1i\"U-f)9q*e)^EQ?-=v)<v,j
YL0i%]=M?5E~E0Ay-A}lq K(bZf?BN?M]?-@yMTU`?^h? .e9I?F!2l!XIX?UM    Q$^    
<9F|*;k???4L?Zc?DY?0mim?9L????$6p???    9
UBT?1D}2@v=L?@U?(:t*dIM-E???EU?\'X%Y??ͽ??(6l)@}\"0fB    
YFT?Q
<)\\*`
Q    Q!8u`f?\"\\.`B\"X0B|I >(e >UDR?$`J
8,cP@R?MZ????
Q???%4j<J?8J????D$Z$2i.<r0e5E<S?4ByH
]L+:qch?6Dz#7r0>tTXH;G~
G0k??? ????N\\????`NH[?O`?J\\?@???&<w,g*<rJ(c6t:K?3n@-4ePM!4i
;Ofn?.?w,bNV?7 X/D*@|+;t
Vps  :?L#\\N PO???HY??????9Kt????\0\0??ߔ?????v??I(7o6H?/mCT?7G?P_?Qf #4l\'_3C{BK\\?\'8p\'?|K    O???\0\0\0???!? NETSCAPE2.0\0\0\0!?\0?\0,\0\0\0\0,%\0\0?\0?    H? ??*\\Ȱ?Ç#J?H??ŋ?]??f??a?<?\"??:&?0?Ռ??6+?0xP???8?`J1I\\?r%tR?:>|ԙ?c%Rv0?h???1X!??:cjժ??? ?0?r? C 0????
`?X\0LG?\"?A?·-
???AV???, `????#;00@?
,N`??p??(E?????B
?V?0?;??? f`??΃????k?%0nY?p??6p:????\0?z???S?ᐄ_?~????ßF
K?*? _???`?I?c?? ?26?,Ї???n????l?^t0???A???a?/??? ?a 90?C?\'???9?a???\00j?\0     ????    
<0M-}???a??L&B({?#?+?Tie???
7???C\"?     Q=?cL?!.???1?t@OD??A???@l8ECT ER???!??(?S??qT??PXQ?1l, ???A?\0#@!?R???????4?I3?8@?
?2??X??\0??@\'찃 3?s?o??c
?L?\'Q?R?
\'|?F -??(#?kpL< ?$G?\0?$?\0?oB?;ʾv???ר?????o/? ?2????? ?N??!?ܓ?!? ?
Ŵ^?H$sH?Ģ??ȉ,?????衇@??p
?#|?
=]<?ďEh0F???k3?(R??I?E*&??8PM?+?L??>?$?$??1?;?    E??PO&v|?
=.??L-?6sA$ ??*H??? $S?P??P?a???a?q0?A=?TA??X|??Գ??h\0????N?????g ?1?  I$V??0Xs/?`?*M?\0?L???\'3?P???\\R+???3? B <ۂl8??sv.???\0J?\0?????qF<??sF+ ??N}L?ij?
0?c???.0
C8!c?؆?\"??Z??d???$
l??e| Q#?`    ?@\0ƍF ?C??Q,?\"ՄHLKR!??#
??B?p@?W`iH܇????????؁??
d0p ?X??q\0
??`?CX?? X??
?@,?f
W<B]`???#]0@?,FP?#@
 ?.???C???????`\"??!?`>???\0???0?!ހ?C? ???2?5T?Ո?``<?? 8?!сt?
Vp??A?s??f.    ?c]@??1????:?<p??\"?Az`D@?\0??@>X H??????irb?#??1_L?b??/H?? ? e? ?[Ԉ??A?Hp\0?e?x?,`?#P$??J )??֍*?`G?\0!?H?$?#k??ט??D??R??\\??X?4c\0 ???
5?C?`?e?
̕1 ? ???????d??5L?K X?$F?I?a_??`q?\0??h?3`?H!i?PD3?Ć7?2N@? f\0?2?????z??v????^AW??@  ???;0?3?
ev?    -P??+?\'??\0{/?C
V??L?^?B,n??+??
?(?Zq?T? ?? ?i\0?q ch?4?y?e,??#D?Z
??? >ˢ?~?
m6\"??#?!???1? ???    a9 X?S$?XD0???*T??H??????v-??N?P?a?????\0?A
?؁?D?F?Z??(d ??????+n0?w?GA?cp`?x8??\0
?C\0?$p^d??<p    W?C
??F=?؎O?Sfl?6R??<jP+? 3؀_х+p0D)? 
???
?1????H(?? LeC    {?V??0Ā?dA5? /Q??T ?x??f?W
l00?ѲR??^?????,
?C??K^?j 3?z݀??-?mD    ?k
???(?( V?\0? ????G?%oP??H?,?0?p?????K?  Hp?k>8+?Ѝ??au    ?MwPrBI ????:? ?? QpЍ??.???=?D??\0<?N?02\\??? t??0??
??X?^W ???    H?ꡁ????J???!??_ ? Я? ???@??&?U?!?I ǐ?    $?e????=? ?H??D>?!?0? ?h?
?\0,?e?E4?X?c??(b????? `zXd??:?2???
?x)&?_??&v#<x?????}???h+?
(?jr@?I??\"d?.??U?,????$h??6
???O?
w1???_c?C
? D??0?D??y??a) R?1?f?\0????&?
$\0 ????$ \\`?°???@???PXo?=-\0>???\0.??\0?$\\P
/?fK] ? ?@??
?0?PPC??P??D\0/???? ????
6?f?0 ,0x?X6`@=? K@??`!??\"?
???,?0??0    ??E? ER\'c`? k??k?\'
??O??^|?P???\0_?u?@?6\0,?     ? \0?07_?5? ??
?\"7@\0???KR??q?F\0?7??M4?\0;?v0P?? b????E?=?\0r?    ??
?dd?V?D?@??@\07 ?Cpg:?
<?T?    jP?\0?B ?\0
G??P6C?I?? ??\0C\0
<?΀

?f??
. /p\\??q
? hk ??3CpU?-k ?\0(pZ=%]??0
-P???
?6L?    v?    ??    _?
J?\0\0K QP    ?\0?     Mp=?[̕
?     @??`CbQC?? l???S+hh?ڰA҆??2m#m? w ? ?
 Q??
p?&?6    I?
??7p?wHC@Da-5aY? ?@??v?P`
?3
>???E ?\0 ?    ;? :?? ??]?  ??F7?7 ?R ??#@
\" +`
???w    ??? \0_?i@?\0@L?V??P0#` . ?8?̄ࢎ???@
Z0I@ ? ] 2P?ȋ??PUk@     @ ?`(0 3 ?? i߰/?\"[????\0????3?晑E?Q`??????`?\0????8?)#`5??T6??3?P;??1??k????^mx
?E
? b0/#??]?PҀK#k??>A? ?Pę.@jpd???\0?@??5S?%T??Љ:? ??:??P?
js*?05>?    m?7m? ??&C???.?8???\0_zt?P\'p5p ??Wm@#?< 
_??
R?V??m@.?\0?\0
ǔF8
?-<g.l ??`C??(?:??$    a
?
?R?u?\0?s :?/p??O?/?ʐ?O?>Pϐ
扑K??Q? ? ??Ǖ\\??$?~d .?zK?\0?8
?
Pu??? @? ?B?u
#I9\0??3y??`{?`a??Y?
    P?@ ? ?@a@+?~??M?nI?RH?nT?5\0) :\0? FC? R?\"?\"?  ??|?x??F ??\\~`UsD? R?# (???0? K? !? ?I    P????\' s.?`?? ??={?7??=?0}?\0?0\0?\0u?]??ً?@\0???C?X?p?.???p???r  ?r- ????p1??`?0???? ?\0_?_??:??U Y ???2 o???Z?P <)_>???\"?0?\'?P?p
???ְj??,?    ??
Ep_8ZC?@5R\0(??\'H\0:?? [??4?)8
T0;0?\0
.p???c\0?J??= \0????
?p    ?#;??x?@&?\' +p;P????p??
:`2?*? EU?<`
?P@?`s^?ZB ???m%???L?? H*ڥz?\"0C?OI\0+??+??\'P?aCЏ?0?`Y??\0l;
??\0ߐ??1 ?$3?
??\0? ??I?p ?<` ?pg?O?0?Y?BZ???>???? ??c+????

?? -?^4B?? ?_? u?P
j??0??ǁ? ?@ȁ??p?8??    ?
P2\0??0?? ɓ?0Ɉ|ȚL?@??\0P Ɉ<?<?@?+
?|??\0    ??\0?|?
?ȍ<2\0???ɬ???0ʤ  ?aP    \0 
?0\0C\0    d???=l?X ?A?<`\0iF?-? Pp\"F$> p??\0e7??k????c???):?z3???#i?P?{3 ?q\" ?@J\0D ??J`??~?\" ?? \'\\PP5??
>?%?(?\0 ?`(3;$_k???u\"?`l-#ǥ? v|N5?P
??    ?? ?<??;??>?????P??0?F}?D]?Hm?D??M??K-?I?G_?XM?P?
?@:=`??a-?aM????? ?S k?M?r ?Pܙ??\"?8 ?S?bD+???Ȱ0\0??    # ??,    ??x\'0?0P<n??L0??3 ????=??
??    ??JD\0? \0J???J ?`?6j\"` \'??<xJ?`?5E?u?M?\0x??׷????՚-?z0ǧ? ??lf?*f?@??=???;?.O=?X??|ԇ\\?L]ޗL?P??O]޲?Ԅ\\??)==??_?A?WE\0=P    ? 
Qp\0????L??ew?? ??p̡?l?1?pEV*bE?C0\0 (p ?p\0j0 ,L?|k??????u?.???????Z??p??e??`?? ??=?jx???? ap q#@;?\0BHT??A)?2?=P%?ƙ??9?y?=?2m?b??*???????t.    :\0?U=?G-?}????T?????Ԑ????M2\0<?b?]?<
:ЈjP    ? 
 ? g????7?#[??fH?\0?b\0mp?@???PC??@ G???p ?&????nu??    x\0x??0E???-0.??=0??pݤPi \0B^    {\0\0??EX??` C.? ??    .0?+|???8p_?I6?0;??/?????
??o,? ??`?? @
??t???=ɀ??W?ȵ|??
????????\0O??P}???tN?Ü?^???\0????(??P???7.?}@+eQ??oa? >P?P
??@$p??+?8:???a??U[ 5?\0p????  v@Q?_?? ?\0F` P??{P????`Qj\0Ǯ??P5?t?rRP?$?? ٹ!f??n?2p?2?>?Pݛ@    *`?*?d??`=֝?@]??-?V_????ީ?ի?? ?????T?}\' _0ِ
\0?
lV?B?׎????
B???^??[ ?\'?xISO? @p\0?f?T? x@???????    ?7??&    6,????=?????GnL 0\00\0)LT? ??X R??a??\'&0N??Va?$I? 8??? ?12???!FV????ƥ?1?5?Y?ѩ\\?\"???N?T????ѣ
 =? S~s???ôP4~K?j?\'?+?@`?68?4PXHI??\"?oٲ??
`
??_ݣS?Z?4j?LC1??T?2p2??x?H?lA???WO?2$-?8a??
??-?)C??Z>&?K???ذ???3????)?( p`??j_B??A?I??>?a?/̓??dz???}j:?X??ʎ1tTH??Fw??b?^Q*mؒAI?%?9???H
?X?f?dfqAI* ? p|??p Y???PR???^?    ??b?)??\"?    ?2???/~`%?????
` ??`VF????Q??#JY??xZ?g?
?즛C?b?)?)ȸ??R??*??Xڀ????Z8?x(??     I?C胃?!?F֐a?.?9??)?``>@D\\???G?p 

?`b J?T    ;vx`4??ଅ7Z(?    \'Z`×f????)jM??1b?`?fƘ?4p ????&(???b ??|b??;?i??Lz?J顆? `????c?H\0??A?
???0???B/????\"  a???aZ;4??\'?a????ЇD4\0G?64?0?X?0&>??#?u?\0?? ?
!H??E!$? ???!  ?aA58??U?qg?dB?
*???*y??B?Z\\y??#VH`?Ip 6,&??$?p
p? D???q?Vn??D
@e?!?w((= ??H?h??g??B?t@dOK\0???$@?\0     `??7??C?3f0Qd?u Z??d
l?}?>??E?K???/\\?M??\"?~???l8????????\0 D??\0llg?Kp ??
?^?A? R?c 8?H!/?xh A?60?r?p Bz,1?@S??RS?????70BE$:?????A#?    NLf\"`  ???
J
??aPP?B!?*E)P??$??9D#??U??CO쀆
??\'???)IKi??\0?@$?
J?Q??   ?X?] ???sh??r~\0R??    n F@ ??8?B?^??<??? ?Ȇ??@&???@??0????vh?4d#?1(\"? k8P?ٍ???3 p?A\0e(?T?
?D+X`a???J???    ?@50? q? ??pEd?\0(?T?0?8B>?KA??
?@???Vъ?B
ʉ4???c4@???2?OY?a? X?,
?Od?C?P($H???? i(%(??B?#??8b??r?`F9‘?Bb!ݨ9
1?\0l?
?@?1??,
G\0`R??#Z?!\0RsȂG \0PY?S@?4\0s???
??TM 3?\0q4?jR???lT\" C?Df?І6??3?`? ?]??>?D?  \\?nO?j*???C?`!D??^?@?s?q?k?F
?y?rf??? 6 ??V)p?Ё?E?Y?\0?*??s UAH?4???j??8?? k?? ?`?,???s?????t_K???\"??
 Z?_????8?+??c?U G?́^q 㦅0o8?`?~?????8?A?~@)7U?8???q$8??\0?y?_???Z@́\0??`??!????J??;?P???X9\\?     ?????;T?V%?`\"(
,?? 
?R?)???_q ????k|?;?B?BP? f?{??<A?? D?
1?????`??,8?`?D؀??\\!l?`Pן?0?0??(B?A?%!??_:??\0i?
??c?f`8w??ծu;?????_.wC???!ee`Yy׫?98??؝.9???~???\0v??p?ؽ6??C
?q4??ӵ???\0G8\0????9*_r,???G?s?}????n:P?0?A0??\\p%t?\"?? W
??
p?Zr?1Ԣ??+???ASp@Ͱ2?$Py4?Xf??, l\" ?@%??y3\\$?0:??!? \0??2|?x?ɐ\0?<??2<,??%@?ѽ?4L?c? \"Ђ?6a
?BW?Խ?ԧ{]S?L\'?EOTx?W?J??D|? ?????yux?9?????o?s_C?c?&G9B
h_{?[h???+?B???$?????, ?????Pj?D?\0 ?@x???????F????4DA??X*? =#??aA? ?? M????#? ?[ ???5 ?\0?a\'?>ЅYt`X\"?%t1??`?R??
??@?N 0tu*???,B,??lB?ѕ§???@?⺞?????M?r??p?!??B?P`;??6?R,??p ?B???J\0B?\0??d?5p\0s?
??iC??;Y @h???K\0??E??/???B??r 7tx\0?\0<`h???hЁn?2a=???R??/?????]  ?`? q?ah???S?o??`?&8??/3??x?0???ч\0?0 \0x???bA ??$??)H?2????? ?\00??:X?v2G?.??Ђ?????O#??@?к℞??J?`6?!
`#?h?(?(?U??a??F????q?
?j?!?\0?e?\"
?e??g4?(2YP
X?h??Kp)8g??\0??#6B????`f?B`?x\0<\0?\'??+???g(?\'?p?+d??כ
?O?^ɕ#ەfP?2\"?)X\0_?C0?V?=!p?ox?O(P?M\0????x0?v88??5?\01_ \09???%?Dp??YX?G??5? #؅?)E??[\'iH?J?C??8?????ا8Y??9???\'?\0(QS(??H\0????:?SRp?/P\0
?!X??\0??> @?j??M???M?(?\"P?\"ЁY??#\0ȑ????Y??E????* \0( ??? -?A ??    ݔ
\0} ?z??6?G@H??)?E ?EP (? ?. \0w?4X??X\"??h\0????8?\0?q\'[?1?OR%?92(?
 B?)???,??tIݫ28?M??|?w84;??\0
x?5x?kV ?Ё` ?I?n??$x?`X???. ??h\'S??RT?JP?O??] ????
?(?h?Y+??R?D?    ?h???܉\\Ѓ]L???/??;??<?z`?i?????M@40?5U??,G ?kp?\'p??&????    z???-??`???B)?R\0ЀZp?q$?7??`5??C?A(??6?*H\0?y?*??a??8?C??(p?vp?????0`5P??-P?;????1(?\\Q%???i?EP??3Y?p?7X?N??=7??o??v??/؄k??????\'8mj?` ??9 X?\'X?L\0֘?0?*?+?f?w\0?Rh?\" ?EF??X\0 ?JP?4?M0???43?(ժtp???\'
?҃?…,LՂM?j\0`((9\"????/@??eSxSGp??8?\'?Y ???b`?!?E8? ?E?E?
?k ?.p??X\0???l??\0 0\0t\0HH?SD?xb??\0?;?T3(?(??&|??\"???l?U?\0???D? S??`?h?;V?km?=???????i5?j??kmC?4\0?5-?@?H?^؅`??1??$\0A??b8?`?$X???%(p?!???X??\0?x???\\???J ?gx ???2q\0D? h&5?`X?E ??Xp?\0\'???S(?\\h???DLD\0?L?\0>[??;S$1??mS7?L؃=h? 
?S?
?V?\0D??
?xp??=)@?`(G<?\0    ?1C?H??\' ?z?)??D?W3?)??`? ???3??` ?8    ]P?\0XW%?? 8۰\\
\0?\"8^aV?#(?_0[6p?C`??6p?{;?V?k?JR????HZ3??( D?u?\0??H[?n??????uхZ?]p??8?g?&??M?|???8\0\0:%??8??8?&??x????`?׮??r?F>?    ??_X???M\0 ???6??:Js?&?4??6?Y???\0?As6Z?<.}?`??!h?.???M?}??*?H?H???q??z\0Ih?im? ?p ?p؛IxW???*?NK& ????k؄(????K?Ph ?\0~?? P?Xܑ????f??fh???R??n8F??4?I3??z`?N???ah???ap?n?h؄?|8a?&???P?H c?>@_\0)p]H?Їbx?!x*H???J\0?? ?@\\??݃P??-? @?,?\0 ???T?2?-?o_??\0???????RĆ:1??pK\0Ȃj80??Y ?|?X?U`\04(?F????:x??:(?L?`?:xb1???`?c?1?, ?\0?0H\0p??
X\010?5\0
??K?3?)xLx?C??w?K?2?\00??D???Å@??:0???T0 P;??:??0?(8Z`?:?\08n)??p?6??????E?\\ ?,@_h?7 ԡÂ&??_p?Q??:?\06h8`j8?2:`7:\0
K?1?????BX熁?&\01H\02?E??*w1Hn???;`??qz`\0??ۆ4???_,?\0?\00P4P?(??????w?K\0\0?z?0X?:?    ?    1?R1 ?\\??ȅ,????tN?tO?tPuQuR/uS?uTOuU_uVouWuX\0\0!?\0?\0,\0
\0\0\0\0?    ???߹???Sx?`Th??D?\0!?\0?\0,
\0
\0\0\0\0?    ???߹???Sx??@??xP?ˆ?\0!?\0?\0,\0    \0\0\0\0???\'???s    ?;7Paƒ.l(q???\0!?\0?\0,\0
\0\0\0\0?    ???߹??Dx0?@?.?hp ƒ\0;','0','0')
mysql error: Unknown column 'private' in 'field list'

mysql error number: 1054

Date: Thursday 22nd of August 2002 04:22:27 PM
Script: [url]http://www.dotagious.com/forum/forum/newthread.php[/url]
Referer: [url]http://www.dotagious.com/forum/newthread.php?action=newthread&forumid=2[/url]


On the very bottom it says

PHP Code:

mysql errorUnknown column 'private' in 'field list' 

So, is that the problem and if so, do you know which query I should run?

Thanks,
Shawn

Xenon 08-22-2002 09:54 PM

normally you have two options to solve this:

1. create a column called private (per phpmyadmin)

2. take out the code of the hack which calls the private column

i'd prefer 2

SpotMe 08-22-2002 09:57 PM

I dont even know which hack this was from. :(

Do you know which php file I could find the code that calls for 'private column' when posting attachments?

Xenon 08-22-2002 10:04 PM

as seen in the errormsg: newthread.php

SpotMe 08-27-2002 10:24 PM

nope. didnt work :(

Scott MacVicar 08-27-2002 10:33 PM

/admin/functions.php

look in the acceptupload function at the end of it :)

SpotMe 08-27-2002 11:17 PM

ok, heres the part of the code, I think it is..

PHP Code:

// read file
    
$filenum fopen($attachment,"rb");
    
$filestuff fread($filenum,$filesize);
    
fclose($filenum);
    
unlink($attachment);
    
$visible iif($moderate,0,1);
  
  
// add to db
    
if (!$allowduplicates) {
      if (
$result=$DB_site->query_first("SELECT attachmentid
                                         FROM attachment
                                         WHERE userid = '
$bbuserinfo[userid]'
                                           AND filedata = '"
.addslashes($filestuff)."'")) {
         
$threadresult=$DB_site->query_first("SELECT post.threadid as threadid,thread.title as title FROM post
                                             LEFT JOIN thread ON (thread.threadid = post.threadid)
                                             WHERE post.attachmentid=
$result[attachmentid]");
        
$threadresult['title'] = htmlspecialchars($threadresult['title']);
        eval(
"standarderror(\"".gettemplate("error_attachexists")."\");");
        exit;
      }
    }
    
$DB_site->query("INSERT INTO attachment (attachmentid,userid,dateline,filename,filedata,visible,private) VALUES (NULL,$bbuserinfo[userid],".time().",'".addslashes($attachment_name)."','".addslashes($filestuff)."','$visible','$private')");
    
$attachmentid=$DB_site->insert_id();
  }
  return 
$attachmentid;


So do you know what I can do to modify this code to take out the error, or do you know based upon that code what query to run?

Thanks for the help, very much appreciated. :)

SpotMe 08-27-2002 11:24 PM

Got it. Thanks so much! :D


All times are GMT. The time now is 12:30 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03607 seconds
  • Memory Usage 1,804KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete