Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#php

11 November 2007


Total 32 pages. You are browsing page 1/32.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last

--- Log opened Sun Nov 11 00:00:20 2007
--- Day changed Sun Nov 11 2007
00:00 <****> Hey, is it faster with MySQL to only select the fields you need?
00:00 <****> "SELECT id,name" instead of "SELECT *"
00:01 <****> JDigital: It might be faster, but I guarantee you that it is not slower. And it saves bandwidth.
00:02 <****> JDigital: Well, and of course, unnecessary memory overhead.
00:02 <****> select * is nothing evil, actually
00:02 <****> Aye, memory is what I was thinking. I'm just not sure if it gives any notable speed increase
00:02 <****> !+select*
00:02 <****> There's nothing wrong with "select *", please stop telling people otherwise.
00:02 <****> or a decrease, even
00:03 <****> Yeah, I'm fine with select *. I'm just looking for ways to optimize.
00:03 <****> JDigital: Nothing notable though.
00:03 <****> JDigital: Possibly a few fraction of a microsecond, that is.
00:04 <****> As I thought.
00:05 <****> JDigital: I wouldn't worry about it.
00:05 <****> gnites
00:12 * GwaiLo finds select name, name preferable to select * but that's mostly personal preference
00:14 <****> Hi, I've generated RSS feeds with PHP on my servers before by setting Apache to parse .xml files with PHP... but if I didn't have access to Apache's config, how would I go about generating RSS with PHP?
00:15 <****> Borbus: .htaccess?
00:15 <****> Oh, you can do it with .htaccess..?
00:15 <****> I'm an Apache noob tbh
00:15 <****> #apache
00:16 <****> lol
00:16 <****> I wasn't even going to ask!
00:16 <****> Borbus: O'rly?
00:16 <****> Positive, really.
00:17 <****> Borbus: :)
00:17 <****> do you guys think i will let a sql injection hole if i do $password=md5($password); and after do the mysql_query("SELECT * from table where password='$password'");
00:17 <****> Ahh I see you can use AddType in .htaccess
00:18 <****> Not unless the md5 function on the server was modified..
00:18 <****> jmoncayo: Since MD5 doesn't include harmful characters, that'd be fine.
00:18 <****> jmoncayo: Use prepared statements.
00:18 <****> Always good practice to escape first anyway...
00:19 <****> definately,
00:19 <****> Borbus: Escaping is obsolete, prepared statements is its replacement.
00:19 <****> Oh?
00:19 <****> Borbus: http://is.php.net/manual/en/function.mysqli-prepare.php
00:20 <****> Oh.. you prepare the whole SQL statement
00:20 <****> What advantages does that have?
00:21 <****> Borbus: You don't have to worry about escaping strings at all.
00:21 <****> Okay, can someone please tell me how to append to the top of a file in php ...
00:21 <****> this has taken me a while now :/
00:22 <****> Borbus: Thus, making SQL Injections virtually impossible.
00:22 <****> Oh I see so you can just put that into your functions or methods instead of rememberinng to escape each string
00:22 <****> I always forget to escape some strings :P
00:22 <****> Borbus: Exactly.
00:22 <****> obnauticus: you don't, you read the file into memory, writes the line, and writes the original file again
00:22 <****> I'll use that from now on
00:23 <****> Borbus: :)
00:23 <****> At the same time as I start using classes for my database connections :)
00:24 <****> Forgetting to escape is disastrous if you're writing a blog about SQL... lol
00:25 <****> Anyway.. thanks, I forgot about .htaccess.. I just had a bit of a freak out when I wondered if .xml would be parsed on other servers :P
00:26 * EmperorLewis is away: Going outside...
00:27 <****> uiuc upsets osu :|
00:27 <****> yes. osu
00:27 <****> WOw this is absolutely odd
00:27 <****> Its like one of the functions have been cached
00:28 <****> I've changed this function in one of my script's includes... and its like it hasnt changed
00:28 <****> Lol mindf**k
00:29 <****> What is the best way to post/receice XML?
00:30 <****> curl?
00:30 <****> is there a speciic function?
00:31 <****> no, there is specific section
00:32 <****> so, i'm trying to assign a function to a variable via this method:
00:32 <****>whatever());
00:32 <****> function assign($what) {
00:32 <****> $func = $what
00:32 <****> }
00:32 <****> however that causes the function to run
00:32 <****> oops... shouldna done that
00:32 <****> any ideas how to go about this?
00:34 <****> No really what the HELL is going on
00:34 <****> I've just removed a function from includes/main.php
00:35 <****> wrong file? :)
00:35 <****> And this page im viewing, index.php,which is including main.php is calling the function, and it still works
00:35 <****> Its definitely the right file
00:35 <****> I even put an echo in the main.php to see
00:35 <****> how do you know?
00:35 <****> and it echoed
00:35 <****> its just really odd
00:35 <****> The function isnt there...
00:36 <****> really fustrated actually
00:36 <****> How can I make methods, private or public in a class?
00:36 <****> public function..
00:37 <****> private function..
00:37 <****> ok.. not just a public: .... and private: .... areas.... ?
00:37 <****> public function doshit() { }
00:37 <****> ok.. in front of each function... private function dopiss() { }
00:38 <****> yea
00:38 <****> and I presume I can overload, like for diahrea ?
00:38 <****> no
00:38 <****> php doesn't let you overload
00:39 <****> sure it does
00:39 <****> really? why not? is there some other philosophy i am not aware of?
00:40 <****> http://us2.php.net/overload
00:40 <****> extension
00:40 <****> and in 5.3 you can overload static also
00:40 <****> Valect: did you actually read that ?
00:41 <****> i read the part that says "this is an extension" and "experimental"


Total 32 pages. You are browsing page 1/32.

First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo