@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35



Comments:

<0> tho im getting it
<0> yaya, i got it
<1> can someone tell me why this isn't replacing on the second matches?
<2> whats the best php book for beginers?
<1> http://www.lurvas.com/be.phps
<3> makaveli: www.php.net/documentation
<0> im getting another header error: http://pastebin.com/569738
<4> hi.. im looking for the best way of making a "position" system, like i have 3 entries, and then i have this up and down buttons, the way im doing this is by giving each entry an unik id, and then clicking up runs thru all 3 entries and update thier values, is that the best way?
<0> it reckons output already started, but I don't understand how
<3> JeeHoover: check the content of the includes
<1> the above code is supposed to grab ${foo} from a document and replace it with the variable in $GLOBAL[[$foo] (yes, I've thought about malicious feeding through $_GET). Right now only the first ${foo} is replaced, but no ${bar} soon thereafter
<3> and see if there is extra whitespace at the beginning and the end of the file
<0> deadroot, it says line 3 is the problem, that is before the includes
<0> what does it matter about the end of the file?
<3> JeeHoover: O.o
<0> ****ing ants up my pants today



<0> had a goddamn ant invasion
<3> JeeHoover: <?php ?>\n\n <- those newlines would count
<5> ants in your pants, literally :P fun stuff
<4> ohh.. i can do so that only 2 entries switches values.. maybe i didnt made my question any clear.. but i think i found a much better way
<3> JeeHoover: line 3 of that same file?
<0> yes
<0> $usr = $_SESSION['usr'];
<0> that line
<0> i don't understand how that is 'output'
<3> me too
<3> oh well, you can wrap it all up with output buffering and put it all behind you
<0> deadroot, I'd love to do that
<0> but I don't have control of the server im uplodaing to
<3> www.php.net/manual/en/ref.outcontrol.php
<3> JeeHoover: no worries, read those functions. ^^
<5> oh man i dont have gmp
<5> damnit
<3> JeeHoover: pay attention to www.php.net/ob_start <- that is the minimum you'll need in your code
<0> deadroot, you look at that pastebin code?
<0> anything wrong?
<3> i don't see anything wrong
<0> that session stuff starts output somehow?
<3> session_start shouldn't output anything but http headers
<3> which is fine
<0> wish php had more helpful error messages
<3> can you paste that error? you can edit the path out
<6> that hsould be plenty
<3> i haven't had problem's with php's error messages
<7> I read this book from cover to cover: http://www.amazon.com/gp/product/0321185781/sr=8-2/qid=1140755612/ref=pd_bbs_2/102-5453190-6981711?%5Fencoding=UTF8
<7> a recommended read... it expanded my horizons programming
<3> horizons programming?
<8> Alright, I am storing a timestamp in the database but I format it like this: date("Ymd",filemtime(...)) ... the reason I do Ymd with PHP's date is because I want to be able to select * from mysql and order by the most recent dates ... if I didn't modify the timestamp from filemtime, would I still be able to order by most recent?
<7> no!take the first half, and programming is the target
<7> "it expanded my horizons"
<7> in programming
<3> foo, that looks weird
<3> filemtime doesn't check the database
<3> www.php.net/filemtime
<0> deadroot, you laugh at horizons?
<3> depending on which horizons you mean. :p
<8> deadroot: uh ... I know it doesn't check the database. I mean, if I store an entry in the database with the original output from filemtime, could I order by that column and get the most recent ?
<0> ****, stuff not working remotely
<0> which works here
<0> **** i hate that
<3> foo: you mean to store the mtime into the database and sort using that?
<0> you mean programmers have a future?
<0> lol
<9> I hope so.. christ..
<9> my standard of living will drop a bit if I cant charge out ragious rates for Php dev
<3> foo: in that case, yes. timestamps are after all, the number of seconds from the Unix epoch
<8> deadroot: Can you give me an example of a timestamp ? Hmm.
<3> filemtime returns a unix timestamp
<0> how "out ragious"?
<3> "outrageous"
<8> deadroot: hm, ok
<0> hehe
<8> deadroot: How many digits is the typical unix timestamp? Not familiar with this. hmm /me googles
<3> it's a 32-bit signed integer
<8> ah, thanks
<3> it overflows in 2038



<3> but the 64-bit timestamps should last a looooot longer
<4> yay.. that was cool.. bye bye
<8> deadroot: Hmm, I'm still confused as to if that's what I really want. If I have a column with the unix timestamp, would I be able to select data and order by that column and get the most recent entries corresponding to the date?
<3> foo, it's the number of seconds from 1970 january 1
<8> deadroot: Ah. What type should I make this column for mysql? int ?
<3> if the timestamps are stored out of order, well, that means time itself is ****ed up
<3> mysql has the timestamp column
<8> Right
<8> I don't want the timestamp column, I'm using filemtime.
<8> hmm /me uses int
<3> it's stores internally as 32-bit signed integers
<3> but outputs as yyymmddhhmmss
<8> ah, ok
<3> you could force it to convert as necessary via mysql's from_unixtimestamp()
<3> from_unixtime()
<8> deadroot: Thanks. I think I got it.
<0> okay
<0> but why does one bit of code work here
<0> and not work on the remote php server?
<3> the remote is dumb
<3> oh wait, computers are fast idiots. ;p
<0> i agree
<0> doesn't help
<0> me
<0> until I find a job I like
<10> how do i jsut add a key and variable to an array ?
<10> ah ha
<10> so simple
<10> cheers
<3> krisp: array("key" => "value");
<11> $arr[]=$string;
<0> oh, for some reason it doesn't work with php4?
<0> I thought $_SESSION['name'] worked in php4 and up
<3> they do
<10> deadcat: I actually needed $array['key'] = $foo
<10> I just had a mental block on it ...
<3> i'm not a cat
<12> (=
<12> i am heheh
<3> :)
<0> a lot of programmers committ suicide I heard
<0> wonder why.. lol
<3> because they discovered the secret of life :p
<0> the secret is that good?
<5> more like that bad :P
<13> does anyone know why this is not echoing the sid?
<13> $result = mysql_query("select sid from posts where post = '$post'", $linkID);}
<13> echo "<p>$result";
<14> it's 42
<3> it's not 42
<15> how would i get a true/false response to deal with when checking a string to see if it contains numbers?
<14> that's why you haven't committed suicide yet
<3> :p
<15> im using /[a-zA-z]+$/ with preg match atm, but thats having issues
<15> any ideas?
<14> is [a-zA-z] even valid?
<3> devians: preg_match for any number. when that returns true, negate it
<3> gravhd: yes
<15> LokyDoky, check your quotes
<14> ok
<15> sure deadroot, one sec
<15> that doesnt work deadroot
<15> its unreliable
<8> How can I have mysql throw an error if a query like UPDATE `rpms` SET `downloads`=downloads+1 WHERE file='somefilethatdoesntexist' doesn't exist?
<3> devians: how so?
<3> gah, i gtg
<3> ask someone else
<15> print_r(preg_match('/[0-9]+$/', $var));
<15> if $var = t43st4 it works
<3> oh
<3> and?
<15> if $var = t4st, it doesnt
<3> drop the $


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #php
or
Go to some related logs:

check for updates grayed out in FIrefox on ubuntu
#perl
#linux
#perl
#css
mdf2iso already ISO9660
patrick___
emerge cinelerra
#gcc
#mysql



Home  |  disclaimer  |  contact  |  submit quotes