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

Channels


#php

27 December 2007


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

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

--- Log opened Thu Dec 27 00:00:00 2007
--- Day changed Thu Dec 27 2007
00:00 <****> and I said it like kazillion times
00:00 <****> I dont know which firefox you're using, but mine doesn't
00:00 <****> or at least twice
00:00 <****> yeah, i didn't notice the change .... grrrrrrrrr
00:01 <****> greenmilitia: and now back to the important question - what are you doing and why?
00:01 <****> and why are you using 5.0.5?
00:01 <****> Is setting $var = "" (empty string) a common practice in php?
00:01 <****> Or is there a function or a better practice to do it?
00:02 <****> its simple enough
00:02 <****> I want to set it empty so it won't be INSERT'd into the mysql adatabase
00:02 <****> Is there an alternative to using an __autoload function?
00:02 <****> Biscuitian_Warhe: spl autoload
00:02 <****> v-dogg: spl?
00:02 <****> redtricycle: if (isset($stuff)) { insert data
00:03 <****> v-dogg: the google news rss feed url is to long for a bot I use to post new items it sorts threw, so i figured while I was creating a smaller url for it, i'd take out the bold, minutes age etc
00:03 <****> Biscuitian_Warhe: http://fi2.php.net/spl_autoload_register
00:06 <****> If anyone has some time, could he/she help me with this (easy) problem?http://pastebin.parentnode.org/29362
00:06 <****> greenmilitia: did you try this: http://news.google.ca/news?&q=%22Sea+Shepherd%22&output=rss ?
00:06 <****> Xana20Randomized: I didnt want to have separate insert queries, though
00:07 <****> Could someone help me with the __autoload issue, it loads the class file but doesn't execute the class... all three files are in one post http://pastebin.com/m330e3ef1
00:07 <****> miro|away: what's the problem?
00:07 <****> $cookie_hash_user_name is empty after declaring it as global
00:08 <****> Biscuitian_Warhe: "execute" meaning?
00:08 <****> redtricycle: then use variables, if its not set, then it'll equal nothing
00:08 <****> v-dogg: The function that I call doesn't run
00:09 <****> miro|away: seems you have misunderstood what "global" does
00:09 <****> miro|away: put global up first
00:10 <****> miro|away: now your _local_ $variable gets overwritten by global $variable
00:11 <****> v-dogg: but I thought I have to call it still on the same way?
00:11 <****> Xana20Randomized: cool, that's what I was wondering. Thanks!
00:12 <****> Biscuitian_Warhe: you probably don't want require_once('$class_name'); but require_once($class_name.'.php');
00:12 <****> Biscuitian_Warhe: now you are loading a file $class_name (literally) everytime
00:13 <****> v-dogg: oo, that makes sense, but what's wrong with the class? it doesn't load when i just try it without the loader
00:13 <****> but only if it's a number?
00:13 <****> ?
00:13 <****> Xana20Randomized?
00:13 <****> Biscuitian_Warhe: what do you mean "without the loader"?
00:14 <****> v-dogg: Like, including the Biscuit.php file in the test.php, and then using $Biscuit = new Biscuit();
00:14 <****> $Biscuit = new Biscuit; <- would adding () help?
00:14 <****> do you get an error?
00:16 <****> v-dogg: it doesn't give any error, just outputs nothing
00:17 <****> Biscuitian_Warhe: and you have error reporting turned to max?
00:19 <****> v-dogg: err, how would I check?
00:21 <****> Biscuitian_Warhe: error_reporting(E_ALL | E_STRICT);
00:22 <****> v-dogg: I put that at the top of the test.php file, and it still repors nothing
00:22 <****> Biscuitian_Warhe: and display_errors ini setting
00:23 <****> when i do a mysql_insert, and the $_POST vars that i use arn't set, will php complain
00:23 <****> ?
00:23 <****> yes
00:24 <****> notice, I think
00:24 <****> v-dogg: Aha! For some reason arch linux disabled the error output...
00:24 <****> is ther a way to prevent this, without changing the error reporting setting
00:25 <****> Xana20Randomized: yes, validating and normalizing all user input
00:25 <****> i have something like for($x=0;$x<500;++$x) for($y=0;$y<500;++$y) mysql_query("insert into table ($x, $y)"); is there any way i can reduce the number if mysql_query calls to insert multiple rows using a single query?
00:25 <****> ...i really need to make this thing faster
00:26 <****> does mysql have COPY? if not can you execute "insert ...; insert ....; insert ...;" in one go?
00:27 <****> you could do something where it would append to mysql_query(insert bla bla(
00:27 <****> ok, let's see
00:27 <****> motanel: sorry, I meant "insert into ... values (...), (...), (...)"
00:27 <****> damn, that's a lot more faster
00:28 <****> what do you do with the data?
00:28 <****> ummm... wait, nothing happened :/ select * from map returns void
00:29 <****> i mean, select * from table :P
00:29 <****> choongii: right now, nothing. i just want to initialize some data
00:30 <****> it's a grid?
00:30 <****> the values will be changed later. i'm writing the script which will build the mysql database and initialize default values
00:30 <****> ok
00:30 <****> motanel: did you try "insert into map values (...), (...), ..."?
00:32 <****> yup, v-dogg: that one works
00:32 <****> v-dogg: I've fixed what seems to be right to me, but the new code/output is here http://pastebin.com/mc703aef
00:34 <****> is there any equivalent to global variables in php?
00:34 <****> wow, actually it was 250k queries ... 500*500 = 250,000
00:35 <****> Urden: umm? what do you mean?
00:35 <****> php has just that - global variables
00:35 <****> (and they are evil)
00:35 <****> i just get tired of having to pass everything in if i want to access it
00:36 <****> :o
00:36 <****> for ($i = 1; $i < $length; $i++) {
00:36 <****> What am I missing here? Parse error: syntax error, unexpected '$', expecting ',' or ';' in /etc
00:37 <****> Urden: you don't want to take that shortcut. global variables are bad style and lead to chaos
00:37 <****> that line seems fine to me
00:37 <****> I see nothing odd in that line. might be the previous line
00:37 <****> puff: try <=
00:37 <****> Urden: learn about design and structure, learn about Singleton and Registry patterns
00:38 <****> Doh, the problem was on another line.
00:38 <****> I like global variables.
00:38 <****> They let me keep all my data in one place.
00:38 <****> So *everybody* can share :-)
00:38 <****> Biscuitian_Warhe: not really sure what's going on. remove the die part
00:38 <****> I like them too. about as much as I like getting stabbed repeatedly in the eye
00:39 <****> puff: do you share your girl friend too?
00:39 <****> v-dogg: Haha, that did it, idk how that really makes a differences if it can find it, but eh, it works now, so thanks! :)
00:39 <****> v-dogg: Only if you ask nicely.
00:39 <****> v-dogg: do you turn your girlfriend into a singleton?
00:39 <****> j/k :P
00:39 <****> Is there a php equivalent to perl's chomp()?
00:40 <****> what does chomp() do
00:40 <****> puff: did you try chop?


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

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


Tutti i nuovi CAP Italiani. Come ottenere il database completo