@# 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



Comments:

<0> i'll sleep good tonight though :)
<1> So will I after only 3 hours of sleep.
<0> been up since 3 yesturday
<2> how can I just dump table schemas in a database.
<1> Wouldn't that depend on which DB you are using?
<1> And/or, wouldn't that be a question for #(dbname)?
<2> sorry wrong tab
<1> :)
<3> $query="select userid, username, DATE_FORMAT(birthday, '%d %m %Y'), DATE_FORMAT(joindate, '%d %m %Y')"; plus fetch array etc returns nothing for ($row['birthday'])...why?
<4> ahh! http://evoluted.net/archives/2005/11/last_modified_php.php
<3> i know thats stricylu a mysql question, meh
<1> Squalleh, No, it's a PHP
<1> DATE_FORMAT(birthday, '%d %m %Y') AS birthday
<1> Put that AS part and it should work. Right now the column name would be DATE_FORMAT(birthday, '%d %m %Y')
<1> $row['DATE_FORMAT(birthday, '%d %m %Y')']
<3> ah right ok



<3> :)
<5> hahaha
<3> nope, thats a parse error
<1> What is?
<3> Birthday: <?php echo ($row['DATE_FORMAT(birthday,\'%d %m %Y')']);?>
<1> Well of course.
<3> ignore that random slash
<5> After hours of patching our database layers for performance enhancements, a coworker comments: "We've turned our website into the ****ing millenium falcon."
<3> but if i slash out both of the \'s then i get nothing returned
<6> *LOL*
<1> Squalleh, That's why we use "AS" :)
<5> "patched to ****, with chewie banging on the database all night long"
<3> oh right yeah, meh
<3> soo where does that AS go?
<1> DATE_FORMAT(birthday, '%d %m %Y') AS birthday
<3> in the query?
<1> Yep
<1> You're aliasing the column name.
<3> ah
<3> cunning
<1> Yeah... It's a developer's secret. Don't tell anyone.
<7> the AS is even optional
<8> SELECT IF (1 > 2, "stupid", "smart") as "Me!";
<1> Yes, but it's great practice to use. Makes it easier to read.
<3> yay
<3> mmkay
<1> sleek, Technically, you should use ' ' instead of " "
<8> SELECT IF (1 < 2, "stupid", "smart") as "You!";
<3> thanks :)
<1> np
<8> will[werk]: why?
<3> on a similar note, im getting some errors with having ; in the vars put into mysql as values
<3> cos '' is faster than ""
<3> cos PHP doesnt evalutate the string for vars if its single quoted
<8> pssssssssssssssh
<1> sleek, I believe in "ANSI SQL Strict" databases, " " represents identifiers (table, column, db names) and ' ' represents strings.
<8> Squalleh: that's not php, that sql
<3> oh yeah
<3> heh
<8> will[werk]: oh nice
<3> not awake today
<8> will[werk]: i still like mine though :)
<1> sleek, I belive MySQL is more relaxed about it, unless you are using 5.0 in STRICT mode.
<9> Also, some databases consider ' ' as surrounding constants, and " " as references to column names
<8> SELECT IF (1 > 2, 'stupid', 'smart') as 'Me!', IF (1 < 2, 'stupid', 'smart') as 'You!';
<8> how's taht?
<9> In Postgres, if I have a query update foo set bar="baz", it will claim there's no column named baz. If I do update foo set bar='baz', it works.
<8> cool
<0> afk for a few
<10> dj_segfault: Yes, that's correct.
<11> dj_segfault: " denotes columns in SQL
<1> dj_segfault, That's what I said... :)
<8> http://pastebin.com/658179
<11> so it's legal :o
<10> MySQL, on the other hand, is weird and uses backticks instead.
<10> Because, well, they like to be different.
<1> mattmcc, You can use " "
<1> In MySQL
<9> will[werk]: Sorry, came to cl*** late and didn't scroll up far enough. Apologies.
<10> If only they weren't different in stupid ways, like inventing "auto_increment" instead of supporting actual sequences.
<12> I keep getting an "unexpected T_ENCAPSED_AND_WHITESPACE"-error when running mysql_fetch_array - any ideas what might cause this?



<1> dj_segfault, Np :)
<13> hey if you want to do an or in an IF Statement you use || right?
<12> some of the resultsets return empty sets, should that matter?
<10> weedar: No, that's a PHP syntax error, the nature of the queries isn't relevant.
<7> will[werk]: only if you switched on ansi mode
<10> emence: Yes. http://php.net/operators.logical
<1> et, Yeah :)
<12> I don't see how the syntax could be wrong, this is the exact line that gets the blame: $rad = mysql_fetch_array($resultat3);
<14> I just wrote a function that makes use of GD/JPEG. The function takes jpg, gif and png images and creates a copy of them suitable as a forum avatar. Anyone familiar with the image functions, please look at --> http://pastebin.com/658176 and see if you can't give me a few pointers on writing it better..
<15> what port do I have to install to have the mail() function on my FreeBSD server??
<7> well, actually, sometimes they work without ansi mode too.
<16> mompe- an SMTP daemon
<16> Sendmail, Postfix, etc.
<17> cyphor: something specific?
<15> aha oki thx!! My jail needs smtp daemon :)
<17> weedar: check the line above it for a missing quote or something
<18> i know the answer to this question is most likely no... but... Is ther any way to call php functions from vb?
<17> weedar: or better yet, post the code on pastebin and give us maybe 10 lines prior to the line giving you the error
<1> lol
<12> will do nater !
<17> simatwork: why do you want to make us hate you?
<18> nater: i'm trying to fix someones vb code.
<18> but i hate vb so much.
<18> i just want to call my php functions and be done with it.
<18> plus avoid the whole vb dbo and odbc stuff.
<18> it's hell i tell you!
<18> i'd rewrite the whole thing as a web app but there is no time.
<17> hmmmm... can you use... uhh...
<18> ok
<18> another question
<14> nater: anything at all... write it more efficient, point out any dumb things I may have done etc..
<17> yeah, can't vb execute commands? execute your php via the shell and capture the output
<18> do you guys know of a way to make print outs that'll be "formatted"? (ie, i want the remote person to print labels).
<19> i'm currently in the php functions docs ... and see Cl*** methods may also be invoked statically using this function by p***ing array($cl***name, $methodname) to the function parameter.
<20> SimAtWork: well, you could use SOAP or something
<12> http://pastebin.com/658189 <- the mysql_fetch_array line gives me issues
<19> is there a way to call a method on a instanciated cl*** ?
<18> ||cw: hrm, i've nver usd soap. I will have to check on that.
<20> nater: vb cannot capture output. at least vb6 can't, it's pretty well retarded
<21> heh...my client is set to ping on *$me*, and here's all you silly people using variables beginning with $me* :P
<20> SimAtWork: basicaly vb would end up as a thick client gui for your web app
<12> I just can't see that my syntax is wrong. At all
<6> $me $me $me ?
<21> gak!
<21> Yeah, that pings me <_<
<20> $meathead
<10> Petecakes: Maybe that wasn't the wisest configuration decision...
<13> mattmcc, thanks
<21> That works too....
<22> is ther a function that will make my number in a specific format, like 1 -> 001
<23> Is there anyway to output query results into the body of a plain text email? I do not know how to insert a loop into the body of an email so that it can output each row of the table? Is this even possible?
<20> loiic: number_format, or sprintf
<22> thanks :)
<10> skm376: "Buffer"
<20> skm376: um, it's just text, concat the rows in the loop
<24> http://sourceforge.net/forum/forum.php?thread_id=1482296&forum_id=72909 (SOMEBODY - PLEASE respond)!!!!
<23> ok, but when I insert the while loop, I get a Parse error: parse error, unexpected T_WHILE
<10> So you inserted it in the wrong place.
<19> mattmcc: is there a way to do something like call_user_func for a method of an instantiated cl*** ?
<12> nater, are you able to find any errors in my syntax?
<17> looking... what does it give you if you echo $sql?
<25> lepine, sure, use an array
<19> Cl*** methods may also be invoked statically using this function by p***ing array($cl***name, $methodname) to the function parameter.
<25> lepine, the callback will be array($object, 'methodname')
<26> how do i unset a variable
<25> lorfds, unset(), obviously
<21> You know, maybe I should find another way of getting my client to ping me...
<27> colder: Can;t be.
<25> Stormchaser, what ?
<27> colde: That simple.
<12> nater, only to increase readability


Name:

Comments:

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






Return to #php
or
Go to some related logs:

aptitude sources.list gnome-core
#fedora
#mysql
MYSQLi_last_insert_id
htc adjacent sibling
#asm
ezSQL_mysql requires mySQL Lib
Syntax error converting the varchar value 'kk' to a column of data type int.
videolan RHEL4
#fedora



Home  |  disclaimer  |  contact  |  submit quotes