Stack Exchange
log in
users (9)
rooms (11)
faq
oblig
general
recent
conversations
PHP
Support group for those afflicted with PHP. Don't ask to ask, ...
10
oblig
Jun 4, 2011 15:45
just amused at the exchange
oblig
Jun 4, 2011 15:37
handbags at dawn here
oblig
May 29, 2011 18:22
(as an aside, you might want to look at PDO, or mysqli_ functions)
oblig
May 29, 2011 18:19
or assign to variable first, then compare variable:
$query = mysql_query($sql);
if ($query === false) { ... }
oblig
May 29, 2011 18:18
mysql_query() should return false if it fails, so you can compare it to false, if that's what you mean
oblig
May 27, 2011 18:10
@JohnD nice gravatar, weird video
oblig
May 27, 2011 18:00
yup
oblig
May 27, 2011 18:00
and exposes that the server runs php generally
oblig
May 27, 2011 17:58
a rainbow table of php credits, heh
oblig
May 27, 2011 17:55
Ternary operator associativity, good one for the ZCE
oblig
May 27, 2011 17:50
and why have something that long, but abbreviate
T_SHIFTLEFT
to
T_SL
oblig
May 27, 2011 17:49
yup, but not everyone rocks the hebrew
oblig
May 27, 2011 17:48
yeah
T_PAAMAYIM_NEKUDOTAYIM
should be replaced with its alias
T_DOUBLE_COLON
oblig
May 27, 2011 17:37
@Radu check your
$PDO->errorInfo
?
oblig
May 27, 2011 16:03
maybe you have $array1, $array2, $array; could store those names in an array and use array_rand to get one of them?
oblig
May 27, 2011 10:15
at which point we'll have chrome v36
oblig
May 27, 2011 10:15
from the roadmap: Ship Firefox 4, 5, 6 and 7 in the 2011 calendar year
oblig
May 27, 2011 10:13
they're speeding up releases
oblig
May 26, 2011 16:35
:D
oblig
May 26, 2011 16:34
everything's quieter than i expected
oblig
May 26, 2011 16:34
not sure it'd work though, ha
oblig
May 26, 2011 16:18
the construct in javascript is wrong too
oblig
May 26, 2011 16:18
yeah, i understood you. wrong as in practice, not parse/fatal error
oblig
May 26, 2011 16:14
but yeah, bad practice
oblig
May 26, 2011 16:13
plenty of sites out there, if you turned on full error reporting in your browser, show undefined variable notices
oblig
May 26, 2011 16:13
shame, as it returns a boolean and you'd need the fuller ternary syntax
oblig
May 26, 2011 16:10
a browser wouldn't like it either, but likely supress the error
oblig
May 26, 2011 16:10
@JohnP i agree, but i was just throwing out a syntax similar to javascript
oblig
May 26, 2011 16:08
@JohnP yup, but ok if notices are off in production?
oblig
May 26, 2011 16:05
@Greg what about
$foo = $bar ?: "bar not set";