| |
| |
| |
|
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
Comments:
<0> troop: But you never actually run the query, you've not got mysql_query($update) <1> no no, i added <1> it runs <1> :=) <1> but only last id <0> troop: Bah .. you could have updated the code you gave me to look at :o <1> exaple, i'm trying 1.line in the form (id 1) and print_r($_POST) turns => <1> update promosyon set firma = 'amerikan', rota = 'izmir-ankara',fiyat ='75' where id ='8' <1> or for 2 for 3 for 4... <0> troop: Yes, of course it will only ever update the last one <0> troop: That while loop outputs the same form fields and buttons on every loop, so the last one outputted will override any that came before it <1> but i have <input type=hidden name=id value="'.$yaz[id].'"> in the form ? <0> Doesn't matter <1> so? i cant? <0> troop: You can, but you'll need to rethink that while loop <2> hi
<1> hmmm <1> im thinking now <2> Is it possible to create http requests in php? <3> Guys? Can someone forward me a site that has examples about how to create DB connection with OOP? <4> there's lots <4> search for something like "database abstraction layer" <3> thanks a lot <1> :=( <5> enygmapantyhose <4> pierapantsandachapeau <5> k im out of here gtg to work.. so I can grace you all with my presnce much longer <0> Meaw: You just need to enter a valid username and p***word for a user with access to the radius database <6> MarkL i haven't set p***word for any user <0> Meaw: Why not? <0> Not even root? <6> yes <0> Meaw: So use: mysql -u root -p radius < badusers.sql <6> MarkL I didn't set p***word for root <6> when i did : echo "create database radius;" | mysql -u root -p , i remove the -p <0> ... <0> Meaw: So use: mysql -u root radius < badusers.sql <6> it says : ERROR 1067 (42000) at line 4: Invalid default value for 'id' <0> So you have a problem in the .sql file <3> Im trying to make a small cl*** that has a DB connection included. So, Im trying to find how do I set variables in the cl*** to the constructor connect the DB and define the object variables (at the moment Im using globals T-T) <6> u mean the badusers.sql ? <6> i'd try it for another .sql file <0> yup <6> it's givin the same <0> What is line 4 anyway? <6> i'll cope you the file in pastebin <7> hi! <7> why does php not print $do even if it is set in url like foo.php?do=anything? <0> ManuP: Because register_globals is Off, and rightly so, so you need to use $_GET['do'] <1> MarkL: do you know any tutorials about my problem ? <6> MarkL : id int(10) DEFAULT '0' NOT NULL auto_increment, <1> i cant do anything, im hold. <7> so i set in url foo.php?do=anything and in php echo $_GET['do']? right? <0> yeah <7> okay, I'll try. thanks <0> troop: I have an example but i think it might confuse you even more .. want to see it anyway? <8> anyone got a regex to check for a valid HTTP address? <1> ok, <1> sure <1> i couldnt do alg. for id selecting........ <1> i think that im stupid <9> hi can anyone please go to www.ea.com and see if it works <1> pangelovski: down <0> troop: http://pastebin.com/720488 .. it uses a test array instead of values from a db <9> ok, thanks <6> MarkL actually this is line4 : CREATE TABLE userinfo ( <1> it is really different from my script <3> Im reading a code here, but got confused, what means the '_' in "$this->_functionname"? <10> Nekusagi-sama: nothing, it's part of the function name <3> arpad,: just readed a bit more, it's just to mess up the reader >_< <0> Meaw: I'd remove DEFAULT '0' as it's auto_incrementing anyway <0> troop: Not really, the principle is the same <10> Nekusagi-sama: it's sometimes used to indicate private properties/methods in php4, but it doesn't actually do anything <0> troop: It displays rows of data with update buttons, then creates an update query depending on the button you press <1> hmmm <0> troop: Just concentrate on how it works rather than the actual variables etc <1> but i think, i created update query first
<1> my problem in there <3> Im reading a ADODB code, but, I can't find the like that connects to the database... there's a lot of connect, NConnect, Connect, PConnect, but no 'mysql_connect' or whatever. How does it work? <1> so, first i select all from db and must add a array, and follow this script ? <0> Meaw: Yeah, that DEFAULT '0' is the problem, i just tested it <0> troop: No ... like i said, don't worry about the array or the variables just look at how it works .. it uses arrays for the html field names, like age[] name[] etc.. that's what you need to do <3> :-/ <0> troop: Then when the form is posted it finds out which button was presses and then gets the right variables to use, like $_POST['age'][1] (if the second button was pressed) <3> Im trying to make a small cl*** that has a DB connection included. So, Im trying to find how do I set variables in the cl*** to the constructor connect the DB and define the object variables (at the moment Im using globals T-T) <11> how could I best fetch the next key value in a MYSQL table ? <0> Nekusagi-sama: Adodb's Connect() is a wrapper around mysql_connect .. so inside Adodb;s definition of Connect() there will be a mysql_connect somewhere <6> MarkL so how the line will be ? <0> ace_me: Why do you need to? <6> MarkL its : id int(10) DEFAULT '0' NOT NULL auto_increment, <0> Meaw: id int(10) NOT NULL auto_increment, <6> so what will it be ? <11> I have 3 tables ! one contain the key autoincrement and the others use the key autogenerated by the first table ! How to insert simultaneously in all 3 tables in order to not risk to lose the key? Or should I insert into one, than take the key from last record and than appen data to other 2 tables ? <6> thanks <12> hi all, how should i install php, as CGI binary or ISAPI module ? <12> i mean, what's the difference <0> ace_me: Yeah, the second option sounds better <11> sound but not sure is the best <0> ace_me: You can use mysql_insert_id() to get the id given to the first one inserted to use in the others <13> How do you write a new line to a text file?? <0> ace_me: No, not sure, I smell bad db design to be honest ;) <0> Macca`: "\n" <13> It writes the charachters '\n' <11> or php_eol <0> no, not '\n' .. "\n" <13> I know it writes it as though it's encapsed in '' <0> ? <13> nm, is there an asc code I can use? <0> Only if you are doing it wrong :o <13> :o <13> fwrite($handle,"Spreadsheet created by User Defined Solutions PHP Parser.\r\n",1024); <0> ascii char 13 is the newline <13> ty <0> `Mace: Your fwrite above works normally for me :o No '\n' ;) <8> what is the simplest way to get the http address from a script, but without the actualy scriptname (e.g. http://localhost/where/my/script/is) <13> MarkL, weird isn't it. <14> kon: how about something like str_replace(basename($script),'',$script); <13> Weird things tend to happen to me a lot when I'm finishing scripts :/ <13> I think I'm cursed. <13> Working now anyway, it's no bother :o <0> kon: echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']; <8> thanks guys! <15> when i execute an upload there is a way to detect the mime <0> kioto: $_FILES['userfile']['type'] <0> `Mace: Sounds to me like the '\n' came from a previous write that used '\n' instead of "\n" .. but it works now so no matter ;) <15> MarkL i can use the apache mime to compare with $_FILES['myfile']['type']; <13> Out of interest MarkL; when using either \n or \r\n for a newline, intended to be detected by a Windows machine, but the .txt file is generated on Linux, do you know off the top of your head which you'd use? <0> kioto: I suppose you could use mime_content_type() if you wanted to, but i wouldn't bother ;) <0> `Mace: I've always used just \n and never had any problems on windows .. but that's mainly because i couldn't be bothered with the whole *nix/windows/mac newline thing <0> `Mace: But \n has served me well. I only use \r\n for emails. <15> MarkL but mime_content_type is not portable <15> depend of the configuration of the php i guess <15> i have supposed to use an array of list like mime type of apache file: $type_allowed = array ('jpg' =>'image/jpg'); <15> ecc ecc <13> MarkL, ok, thanks <16> I've got a throwaway variable in a list, can I just go like: list(NULL, $var1, $var2) = ? <3> Can an object call a 'include'? <3> I mean, an include with HTML code <17> soap's cl***map option... it seems to simply use __call() magic method of the cl*** (if it exists); otherwise, just arbitrarily sets properties to their corresponding soap result values; is there any means by which to properly invoke the cl*** constructor when mapping soap result sets back to cl***es? <18> hi folks <1> actually it must be take id when i push the button <18> can anyone suggest what's wrong with this script : http://pastebin.com/720527 <1> but it everytime select last id <16> Nekusagi-sama, <?php include("includefile.php")?>? <18> the error is something like 'expected ';' on line 30' <1> but in while, i gave id for every line , every button. <19> line 30 is your problem tax0n <18> exact error is: Parse error: parse error, unexpected '=', expecting ';' in /home/malder/public_html/img/trav.php on line 30 <19> you ahve an extra quote in threre <11> echo PHP_EOL.' <g'; <0> tax0n: Your for loop uses i= etc .. should be $i
Return to
#php or Go to some related
logs:
#mysql #web #perl no matching function for call fluxspace Ubuntu Live su password #perl apev2 TAG ubuntu xorg.conf viewsonic vp201b hsync #perl Sorry, Xv not supported by this X11 version/driver
|
|