Discussion:
PHP Syntax Question
(too old to reply)
ah
2009-05-21 02:27:31 UTC
Permalink
On Sun, 17 May 2009 22:38:59 +0200, Thomas Mlynarczyk
$username = 'Onideus Mad Hatter';
"SELECT `name` FROM `user_data` WHERE `name` = '$username'"
... becomes
"SELECT `name` FROM `user_data` WHERE `name` = 'Onideus Mad Hatter'"
"SELECT name FROM user_data WHERE name = $username"
... becomes
"SELECT name FROM user_data WHERE name = Onideus Mad Hatter"
And that's just wrong in SQL. Leaving out the backticks is okay here,
but strings must be quoted. If you saw it like this in a tutorial, then
the tutorial is wrong.
I've seen it "wrong" like that on quite literarily DOZENS of different
online tutorials...hence my question.
I'm wondering if maybe if it's from some intermediary program, like a
sort of FrontPage for PHP that allows such syntax which is then
"corrected" on output.
I'm wondering if maybe it's merely from being a clueless-fuckwit.
--
ah

http://www.gianturl.com?QnnvQaGyGV,V8j,Y3F3v8KgC4N7N,zv8,,9j,V3V9D,dK84f0j2s,n6L,TC7fxZHjJTk5x0y7FHlQ0,,65gBKd,7YqP5r,fCNw9nQ6fT,f,1SH5g3QKHByX1q7kP6,M,4rZFsQpq4S,,9yjZm,YSsd,bWs,4,5ksQ,1,c6bT,x3nl7rz,rvhDlxw0PQ1D,cy7wm3,8,V8Jf,qK6,L,pwSf9pY9,gfY9,twqy,dvZG1,8Ffgn,1bj9l1pb5r,,,dw4bB2,,m3w,mK,,n0lP7F6V1h,9F,7rct1rc,QPtw0,FLjgjM,q,LRm,k1l7r4FTd,7Rz72cVWcz5,wW0,w,TRg4hM9vTwmQ6,B3,3JSTQkJ0r3,M0FPf8xBVj,nc7,g,5rsGklSKxh,,,,h9J4lpWH1Td1pKDb2lt0c,Nm,mPxg6g6GZ4PT,z6n,4Q9VZ0,dj,,4DHP,,Gl5rL2bnn,1qb,k,ttpGB8Q1VmcmN7,j3,8,p3,QB,th0mX3,xt2dMqJc,,0pD1C6Q5p,3D,4zwg9vrS,,dn4hYHwtkXnzRKNg,w3l1d8WG,F7,d63p,Ywl0SjK4,nhBWl1,M6sXnj,7,N0q7DCSFh,5v1,L8YBz1nV,,,y,5Lwd3jhLpvVXwgZzB,z6X6,gK,0Tj5hMGv4rj7plY,jb,z,4,4ZT6GS,k5sw6H4BB0SbhxG1,,Hl,Q,9t,7,kcQ6,,t,cFjmNfp
Onideus Mad Hatter
2009-05-21 03:33:39 UTC
Permalink
On Sun, 17 May 2009 22:38:59 +0200, Thomas Mlynarczyk
$username = 'Onideus Mad Hatter';
"SELECT `name` FROM `user_data` WHERE `name` = '$username'"
... becomes
"SELECT `name` FROM `user_data` WHERE `name` = 'Onideus Mad Hatter'"
"SELECT name FROM user_data WHERE name = $username"
... becomes
"SELECT name FROM user_data WHERE name = Onideus Mad Hatter"
And that's just wrong in SQL. Leaving out the backticks is okay here,
but strings must be quoted. If you saw it like this in a tutorial, then
the tutorial is wrong.
I've seen it "wrong" like that on quite literarily DOZENS of different
online tutorials...hence my question.
I'm wondering if maybe if it's from some intermediary program, like a
sort of FrontPage for PHP that allows such syntax which is then
"corrected" on output.
I'm wo<WHACK>
If you're not apart of the solution, you're apart of the problem.
Please correct yourself in the future so as not to pester any of the
adults with your infantile name calling, child.

--

Onideus Mad Hatter
mhm ¹ x ¹
http://www.backwater-productions.net
http://www.uncensored-inter.net


Hatter Quotes
-------------
"Freedom, true freedom, is nothing more than intellectual advantage over others."

"When I listen to people I don't really listen to what it is they're
saying, so much as what they're saying it for."

"Don't ever fuck with someone who has more creativity than you do."

"You're only one of the best if you're striving to become one of the
best."

"I didn't make reality, Sunshine, I just verbally bitch slapped you
with it."

"I'm not a professional, I'm an artist."

"Usenet Filters - Learn to shut yourself the fuck up!"

"Drugs killed Jesus you know...oh wait, no, that was the Jews, my
bad."

"The more I learn the more I'm killing my idols."

"Is it wrong to incur and then use the hate ridden, vengeful stupidity
of complete strangers in random Usenet froups to further my art?"

"Freedom is only a concept, like race it's merely a social construct
that doesn't really exist outside of your ability to convince others
of its relevancy."

"Next time slow up a lil, then maybe you won't jump the gun and start
creamin yer panties before it's time to pop the champagne proper."

"Reality is directly proportionate to how creative you are."

"People are pretty fucking high on themselves if they think that
they're just born with a soul. *snicker*...yeah, like they're just
givin em out for free."

"How sad that you're such a poor judge of style that you can't even
properly gauge the artistic worth of your own efforts."

"Those who record history are those who control history."

"I am the living embodiment of hell itself in all its tormentive rage,
endless suffering, unfathomable pain and unending horror...but you
don't get sent to me...I come for you."

"Ideally in a fight I'd want a BGM-109A with a W80 250 kiloton
tactical thermonuclear fusion based war head."

"Tell me, would you describe yourself more as a process or a
function?"

"Apparently this group has got the market cornered on stupid.
Intelligence is down 137 points across the board and the forecast
indicates an increase in Webtv users."

"Is my .sig delimiter broken? Really? You're sure? Awww,
gee...that's too bad...for YOU!" `, )
ah
2009-05-22 02:21:06 UTC
Permalink
Post by Onideus Mad Hatter
On Sun, 17 May 2009 22:38:59 +0200, Thomas Mlynarczyk
$username = 'Onideus Mad Hatter';
"SELECT `name` FROM `user_data` WHERE `name` = '$username'"
... becomes
"SELECT `name` FROM `user_data` WHERE `name` = 'Onideus Mad Hatter'"
"SELECT name FROM user_data WHERE name = $username"
... becomes
"SELECT name FROM user_data WHERE name = Onideus Mad Hatter"
And that's just wrong in SQL. Leaving out the backticks is okay here,
but strings must be quoted. If you saw it like this in a tutorial, then
the tutorial is wrong.
I've seen it "wrong" like that on quite literarily DOZENS of different
online tutorials...hence my question.
I'm wondering if maybe if it's from some intermediary program, like a
sort of FrontPage for PHP that allows such syntax which is then
"corrected" on output.
I'm wo<WHACK>
If you're not apart of the solution, you're apart of the problem.
Please correct yourself in the future so as not to pester any of the
adults with your infantile name calling, child.
Q.E.D.
--
ah

http://www.gianturl.com?QnnvQaGyGV,V8j,Y3F3v8KgC4N7N,zv8,,9j,V3V9D,dK84f0j2s,n6L,TC7fxZHjJTk5x0y7FHlQ0,,65gBKd,7YqP5r,fCNw9nQ6fT,f,1SH5g3QKHByX1q7kP6,M,4rZFsQpq4S,,9yjZm,YSsd,bWs,4,5ksQ,1,c6bT,x3nl7rz,rvhDlxw0PQ1D,cy7wm3,8,V8Jf,qK6,L,pwSf9pY9,gfY9,twqy,dvZG1,8Ffgn,1bj9l1pb5r,,,dw4bB2,,m3w,mK,,n0lP7F6V1h,9F,7rct1rc,QPtw0,FLjgjM,q,LRm,k1l7r4FTd,7Rz72cVWcz5,wW0,w,TRg4hM9vTwmQ6,B3,3JSTQkJ0r3,M0FPf8xBVj,nc7,g,5rsGklSKxh,,,,h9J4lpWH1Td1pKDb2lt0c,Nm,mPxg6g6GZ4PT,z6n,4Q9VZ0,dj,,4DHP,,Gl5rL2bnn,1qb,k,ttpGB8Q1VmcmN7,j3,8,p3,QB,th0mX3,xt2dMqJc,,0pD1C6Q5p,3D,4zwg9vrS,,dn4hYHwtkXnzRKNg,w3l1d8WG,F7,d63p,Ywl0SjK4,nhBWl1,M6sXnj,7,N0q7DCSFh,5v1,L8YBz1nV,,,y,5Lwd3jhLpvVXwgZzB,z6X6,gK,0Tj5hMGv4rj7plY,jb,z,4,4ZT6GS,k5sw6H4BB0SbhxG1,,Hl,Q,9t,7,kcQ6,,t,cFjmNfp
Loading...