Re: [PHP] PhP / MySQL problem
I'm using FF. But it asks to confirm the change of password of my MySQL users. If I comment the php/mysql lines in the .php files, I do not have such a pop-up. Ludovic André wrote: > > >> Hi, >> >> I created a form asking username, password, country, etc. >> On the submit of this form I make a sql connection and update the >> database, >> add the user. >> >> The problem is that whenever the field 'password' is filled in, >> "it" (I don't know what) is asking to confirm the change of the password. >> >> I made a printscreen to clarify : >> >> http://matthew16.free.fr/sql.jpg >> >> This is what I get when I try to submit the form and I filled in field >> password. >> The users displayed in the pop-up are the MySQL users. > This has nothing to do with your PHP/MySQL, but it's a feature of your > browser (you're using Firefox, aren't you?) > Did you use the functionnality "remember the password" ? If so, then the > users listed here are the ones for whom you wanted to remember the > password. Firefox tries to be smart in this case: if you're updating the > password, it asks you which user has changed... > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- View this message in context: http://www.nabble.com/PhP---MySQL-problem-tf4349742.html#a12394801 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhP / MySQL problem
On Wed, August 29, 2007 2:03 pm, debussy007 wrote: > I created a form asking username, password, country, etc. > On the submit of this form I make a sql connection and update the > database, > add the user. > > The problem is that whenever the field 'password' is filled in, > "it" (I don't know what) is asking to confirm the change of the > password. > > I made a printscreen to clarify : > > http://matthew16.free.fr/sql.jpg > > This is what I get when I try to submit the form and I filled in field > password. > The users displayed in the pop-up are the MySQL users. > > The php/sql code is the following : > > mysql_select_db("mydb", $link) or die(mysql_error()); > $query = > "INSERT INTO members > (username,password,date_of_birth,e_mail,country) > VALUES ('". > $_POST['username']."','". > $_POST['password']."','". > $_POST['dateofbirth']."','". > $_POST['email']."','". > $_POST['country']."')"; > $result = mysql_query($query, $link) or die($query . " - " . > mysql_error()); I believe that browser is configured to "remember" passwords (BAD IDEA!!!) and is asking you to confirm the change for its local memory. I am 100% certain that whatever it is, it ain't PHP doing it. :-) -- Please vote for this great band: http://acl.mp3.com/feature/soundandjury/?band=COMPANY-OF-THIEVES Requires email confirmation. One vote per day per email limit. Obvious ballot-stuffing will be revoked. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhP / MySQL problem
Hi, I created a form asking username, password, country, etc. On the submit of this form I make a sql connection and update the database, add the user. The problem is that whenever the field 'password' is filled in, "it" (I don't know what) is asking to confirm the change of the password. I made a printscreen to clarify : http://matthew16.free.fr/sql.jpg This is what I get when I try to submit the form and I filled in field password. The users displayed in the pop-up are the MySQL users. This has nothing to do with your PHP/MySQL, but it's a feature of your browser (you're using Firefox, aren't you?) Did you use the functionnality "remember the password" ? If so, then the users listed here are the ones for whom you wanted to remember the password. Firefox tries to be smart in this case: if you're updating the password, it asks you which user has changed... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & MySQL Problem
Hi there, good morning, as posted yesterday (I guess it kind of got overlooked by the nmber of posts here), I was such a dirk that I put a hidden action in my form that redirected the test page to another (currently running) form which didn't have the changes in it. So my test page showed me data of a live page... dumb me, I know. But after hours and hours of coding, I bet this even happens to the best out there :oP Little piece of code sticking somewhere and you don't even remember that it is there... that reminds me to continue writing the handbook to this website *g* Have a great coding-day :o)) Chris - Original Message - From: "Richard Lynch" <[EMAIL PROTECTED]> To: "Christian Haensel" <[EMAIL PROTECTED]> Cc: Sent: Tuesday, May 22, 2007 2:42 AM Subject: Re: [PHP] PHP & MySQL Problem On Mon, May 21, 2007 2:26 am, Christian Haensel wrote: Good morning friends, I have a script that collects data from a form and puts together a mysql query to search a database. Now, everything worked fine until I added a few new form fields... now the $_POST['var'] don't reach the script... I have about 20 to 25 form fields which are all taken into the query... Now my question: is there a limit in the fields that I can use in the query string to query the database? Somehow the script doesn't even output the value of the POST data anymore... been using this stuff for years now, and i'm feeling really silly at the moment. I'd appreciate any help. POST data *does* have a limit, possibly, based on your selection of browser/server software... It's a ridiculously high limit however, so it seems more likely that you just added a typo to your code. Show us code to get an answer. And estimate for us the size of the POST data as well. Without those bits of info, our answers will be: Maybe. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & MySQL Problem
On Mon, May 21, 2007 2:26 am, Christian Haensel wrote: > Good morning friends, > > I have a script that collects data from a form and puts together a > mysql > query to search a database. > Now, everything worked fine until I added a few new form fields... now > the > $_POST['var'] don't reach the script... > > I have about 20 to 25 form fields which are all taken into the > query... > > Now my question: is there a limit in the fields that I can use in the > query > string to query the database? Somehow the script doesn't even output > the > value of the POST data anymore... been using this stuff for years now, > and > i'm feeling really silly at the moment. > > I'd appreciate any help. POST data *does* have a limit, possibly, based on your selection of browser/server software... It's a ridiculously high limit however, so it seems more likely that you just added a typo to your code. Show us code to get an answer. And estimate for us the size of the POST data as well. Without those bits of info, our answers will be: Maybe. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & MySQL Problem
Guys nevermind... stupid moron that I am I put a hidden action in the form whích I totally (!!) forgot... All my code is fine so far, and all is working perfectly... now that bloddy thing cost me 3 DAYS of work... sometimes I wonder if I should rather sell shoes than calling myself a webdeveloper and work at that job all day long... geez! Anyhow, thanks for your help guys... time for Aspirin over here... laterz! Chris - Original Message - From: "Zoltán Németh" <[EMAIL PROTECTED]> To: "Christian Haensel" <[EMAIL PROTECTED]> Cc: Sent: Monday, May 21, 2007 10:16 AM Subject: Re: [PHP] PHP & MySQL Problem 2007. 05. 21, hétfő keltezéssel 10.04-kor Christian Haensel ezt írta: I thought so, too. But the part where it receives the data is this: $s_marke = $_POST['marke']; $s_modell = $_POST['modell']; $s_preis_von = $_POST['preis_von']; $s_preis_bis = $_POST['preis_bis']; $s_mileage_von = $_POST['mileage_from']; $s_mileage_bis = $_POST['mileage_to']; $s_ez_von = $_POST['ez_from']; $s_ez_bis = $_POST['ez_bis']; $s_search_text = $_POST['search_text']; $s_cat = $_POST['cat']; $kw_von = $_POST['kw_von']; $kw_bis = $_POST['kw_bis']; (part of it) And this is the relevant part of the *** 44/60 55/75 66/90 81/110 92/125 110/150 147/200 184/250 220/300 257/350 The funny thing is that all vars are being received except for the last two: $kw_von = $_POST['kw_von']; $kw_bis = $_POST['kw_bis']; and if you do a var_dump($_POST) what do you get? are these values not showing up at all? if so, then you should check whether they are within the and tags... I made that mistake once... greets Zoltán Németh I am s stuck here, it ain't even funny anymore *g* And my boss is, of course, waiting for a result. Howcome people don't get that programming sometimes really IS leaning back and closing your eyes *gr* :oP Thanks for trying to help me :o) Chris ----- Original Message - From: "Zoltán Németh" <[EMAIL PROTECTED]> To: "Christian Haensel" <[EMAIL PROTECTED]> Cc: Sent: Monday, May 21, 2007 9:58 AM Subject: Re: [PHP] PHP & MySQL Problem > 2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta: >> Right, here we go... this page has about 1000 lines of code, so here >> the >> relevant stuff. >> >> $s_query = "SELECT * FROM database WHERE >> kategorie LIKE '$s_cat' AND >> marke LIKE '$s_marke' AND >> leistung_kw >= '$kw_von' AND leistung_kw <= '$kw_bis' AND >> preis >= '$s_preis_von' AND >> preis <= '$s_preis_bis'".$checkboxes.$sort_str; >> >> I get the $checkboxes from the POST checkboxes, which looks like this >> (an >> example): >> >> $kraftstoffart = $_POST['fueltype']; >> if($kraftstoffart == "3") { >> $checkboxes .= ""; >> }elseif($kraftstoffart == "2") { >> $checkboxes .= " AND kraftstoffart = '2'"; >> }elseif($kraftstoffart == "1") { >> $checkboxes .= " AND kraftstoffart = '1'"; >> } >> >> and the $sort_str comes in like >> >> $sort_by = $_POST['sort_by']; >> $desc_asc = $_POST['desc_asc']; >> $sort_str = " ORDER BY ".$sort_by." ".$desc_asc; >> >> >> The query then just goes like >> $do_q = mysql_query($s_query) or die(mysql_error()); >> >> and that's it... no errors shown, just the regular output which I had >> before I put the new fields in there. So no changes to what I've had >> before... but there should be changes *g* > > actually there seems to be no problem with your query (besides that you > should check posted values first in order to avoid SQL injection) > > you said in your first letter that "$_POST['var'] don't reach the > script" - I would guess the relevant part is not the query but rather > the form itself... > > greets > Zoltán Németh > >> >> I hope anybody can find some sense in what I'm writing here... hardly >> makes >> sense to me :oP >> >> Cheers! >> >> >> >> >> >> >> >> - Original Message - >> From: "Zoltán Németh" <[EMAIL PROTECTED]> >> To: "Christian Haensel" <[EMAIL PROTECTED]> >> Cc: >> Sent: Monday, May 21, 2007 9:36 AM >> Subject: Re: [PHP] PHP & MySQL Problem >> >> >> > 2007. 05. 2
Re: [PHP] PHP & MySQL Problem
2007. 05. 21, hétfő keltezéssel 10.04-kor Christian Haensel ezt írta: > I thought so, too. But the part where it receives the data is this: > > $s_marke = $_POST['marke']; > $s_modell = $_POST['modell']; > $s_preis_von = $_POST['preis_von']; > $s_preis_bis = $_POST['preis_bis']; > $s_mileage_von = $_POST['mileage_from']; > $s_mileage_bis = $_POST['mileage_to']; > $s_ez_von = $_POST['ez_from']; > $s_ez_bis = $_POST['ez_bis']; > $s_search_text = $_POST['search_text']; > $s_cat = $_POST['cat']; > $kw_von = $_POST['kw_von']; > $kw_bis = $_POST['kw_bis']; > > (part of it) > > And this is the relevant part of the > > > *** > 44/60 > > 55/75 > 66/90 > 81/110 > 92/125 > 110/150 > 147/200 > 184/250 > 220/300 > 257/350 > > > The funny thing is that all vars are being received except for the last two: > $kw_von = $_POST['kw_von']; > $kw_bis = $_POST['kw_bis']; and if you do a var_dump($_POST) what do you get? are these values not showing up at all? if so, then you should check whether they are within the and tags... I made that mistake once... greets Zoltán Németh > > I am s stuck here, it ain't even funny anymore *g* And my boss is, of > course, waiting for a result. Howcome people don't get that programming > sometimes really IS leaning back and closing your eyes *gr* :oP > > Thanks for trying to help me :o) > > Chris > > - Original Message - > From: "Zoltán Németh" <[EMAIL PROTECTED]> > To: "Christian Haensel" <[EMAIL PROTECTED]> > Cc: > Sent: Monday, May 21, 2007 9:58 AM > Subject: Re: [PHP] PHP & MySQL Problem > > > > 2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta: > >> Right, here we go... this page has about 1000 lines of code, so here the > >> relevant stuff. > >> > >> $s_query = "SELECT * FROM database WHERE > >> kategorie LIKE '$s_cat' AND > >> marke LIKE '$s_marke' AND > >> leistung_kw >= '$kw_von' AND leistung_kw <= '$kw_bis' AND > >> preis >= '$s_preis_von' AND > >> preis <= '$s_preis_bis'".$checkboxes.$sort_str; > >> > >> I get the $checkboxes from the POST checkboxes, which looks like this (an > >> example): > >> > >> $kraftstoffart = $_POST['fueltype']; > >> if($kraftstoffart == "3") { > >> $checkboxes .= ""; > >> }elseif($kraftstoffart == "2") { > >> $checkboxes .= " AND kraftstoffart = '2'"; > >> }elseif($kraftstoffart == "1") { > >> $checkboxes .= " AND kraftstoffart = '1'"; > >> } > >> > >> and the $sort_str comes in like > >> > >> $sort_by = $_POST['sort_by']; > >> $desc_asc = $_POST['desc_asc']; > >> $sort_str = " ORDER BY ".$sort_by." ".$desc_asc; > >> > >> > >> The query then just goes like > >> $do_q = mysql_query($s_query) or die(mysql_error()); > >> > >> and that's it... no errors shown, just the regular output which I had > >> before I put the new fields in there. So no changes to what I've had > >> before... but there should be changes *g* > > > > actually there seems to be no problem with your query (besides that you > > should check posted values first in order to avoid SQL injection) > > > > you said in your first letter that "$_POST['var'] don't reach the > > script" - I would guess the relevant part is not the query but rather > > the form itself... > > > > greets > > Zoltán Németh > > > >> > >> I hope anybody can find some sense in what I'm writing here... hardly > >> makes > >> sense to me :oP > >> > >> Cheers! > >> > >> > >> > >> > >> > >> > >> > >> - Original Message - > >> From: "Zoltán Németh" <[EMAIL PROTECTED]> > >> To: "Christian Haensel" <[EMAIL PROTECTED]> > >> Cc: > >> Sent: Monday, May 21, 2007 9:36 AM > >> Subject: Re: [PHP] PHP & MySQL Problem > >> > >> > >> > 2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta: > >> >> Good morning friends, > >> >> > >> >> I have a script that collects data from a form and puts together a > >> >> mysql > >> >> query to search a database. > >> >> Now, everything worked fine until I added a few new form fields... now > >> >> the > >> >> $_POST['var'] don't reach the script... > >> >> > >> >> I have about 20 to 25 form fields which are all taken into the > >> >> query... > >> >> > >> >> Now my question: is there a limit in the fields that I can use in the > >> >> query > >> >> string to query the database? Somehow the script doesn't even output > >> >> the > >> >> value of the POST data anymore... been using this stuff for years now, > >> >> and > >> >> i'm feeling really silly at the moment. > >> > > >> > AFAIK there is no limit in the number of fields in a query... > >> > post some code please, otherwise I don't think anyone will be able to > >> > help you > >> > > >> > greets > >> > Zoltán Németh > >> > > >> >> > >> >> I'd appreciate any help. > >> >> > >> >> Cheers! > >> >> Chris > >> >> > >> > > >> > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & MySQL Problem
I thought so, too. But the part where it receives the data is this: $s_marke = $_POST['marke']; $s_modell = $_POST['modell']; $s_preis_von = $_POST['preis_von']; $s_preis_bis = $_POST['preis_bis']; $s_mileage_von = $_POST['mileage_from']; $s_mileage_bis = $_POST['mileage_to']; $s_ez_von = $_POST['ez_from']; $s_ez_bis = $_POST['ez_bis']; $s_search_text = $_POST['search_text']; $s_cat = $_POST['cat']; $kw_von = $_POST['kw_von']; $kw_bis = $_POST['kw_bis']; (part of it) And this is the relevant part of the *** 44/60 55/75 66/90 81/110 92/125 110/150 147/200 184/250 220/300 257/350 The funny thing is that all vars are being received except for the last two: $kw_von = $_POST['kw_von']; $kw_bis = $_POST['kw_bis']; I am s stuck here, it ain't even funny anymore *g* And my boss is, of course, waiting for a result. Howcome people don't get that programming sometimes really IS leaning back and closing your eyes *gr* :oP Thanks for trying to help me :o) Chris - Original Message ----- From: "Zoltán Németh" <[EMAIL PROTECTED]> To: "Christian Haensel" <[EMAIL PROTECTED]> Cc: Sent: Monday, May 21, 2007 9:58 AM Subject: Re: [PHP] PHP & MySQL Problem 2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta: Right, here we go... this page has about 1000 lines of code, so here the relevant stuff. $s_query = "SELECT * FROM database WHERE kategorie LIKE '$s_cat' AND marke LIKE '$s_marke' AND leistung_kw >= '$kw_von' AND leistung_kw <= '$kw_bis' AND preis >= '$s_preis_von' AND preis <= '$s_preis_bis'".$checkboxes.$sort_str; I get the $checkboxes from the POST checkboxes, which looks like this (an example): $kraftstoffart = $_POST['fueltype']; if($kraftstoffart == "3") { $checkboxes .= ""; }elseif($kraftstoffart == "2") { $checkboxes .= " AND kraftstoffart = '2'"; }elseif($kraftstoffart == "1") { $checkboxes .= " AND kraftstoffart = '1'"; } and the $sort_str comes in like $sort_by = $_POST['sort_by']; $desc_asc = $_POST['desc_asc']; $sort_str = " ORDER BY ".$sort_by." ".$desc_asc; The query then just goes like $do_q = mysql_query($s_query) or die(mysql_error()); and that's it... no errors shown, just the regular output which I had before I put the new fields in there. So no changes to what I've had before... but there should be changes *g* actually there seems to be no problem with your query (besides that you should check posted values first in order to avoid SQL injection) you said in your first letter that "$_POST['var'] don't reach the script" - I would guess the relevant part is not the query but rather the form itself... greets Zoltán Németh I hope anybody can find some sense in what I'm writing here... hardly makes sense to me :oP Cheers! - Original Message - From: "Zoltán Németh" <[EMAIL PROTECTED]> To: "Christian Haensel" <[EMAIL PROTECTED]> Cc: Sent: Monday, May 21, 2007 9:36 AM Subject: Re: [PHP] PHP & MySQL Problem > 2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta: >> Good morning friends, >> >> I have a script that collects data from a form and puts together a >> mysql >> query to search a database. >> Now, everything worked fine until I added a few new form fields... now >> the >> $_POST['var'] don't reach the script... >> >> I have about 20 to 25 form fields which are all taken into the >> query... >> >> Now my question: is there a limit in the fields that I can use in the >> query >> string to query the database? Somehow the script doesn't even output >> the >> value of the POST data anymore... been using this stuff for years now, >> and >> i'm feeling really silly at the moment. > > AFAIK there is no limit in the number of fields in a query... > post some code please, otherwise I don't think anyone will be able to > help you > > greets > Zoltán Németh > >> >> I'd appreciate any help. >> >> Cheers! >> Chris >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & MySQL Problem
2007. 05. 21, hétfő keltezéssel 09.43-kor Christian Haensel ezt írta: > Right, here we go... this page has about 1000 lines of code, so here the > relevant stuff. > > $s_query = "SELECT * FROM database WHERE > kategorie LIKE '$s_cat' AND > marke LIKE '$s_marke' AND > leistung_kw >= '$kw_von' AND leistung_kw <= '$kw_bis' AND > preis >= '$s_preis_von' AND > preis <= '$s_preis_bis'".$checkboxes.$sort_str; > > I get the $checkboxes from the POST checkboxes, which looks like this (an > example): > > $kraftstoffart = $_POST['fueltype']; > if($kraftstoffart == "3") { > $checkboxes .= ""; > }elseif($kraftstoffart == "2") { > $checkboxes .= " AND kraftstoffart = '2'"; > }elseif($kraftstoffart == "1") { > $checkboxes .= " AND kraftstoffart = '1'"; > } > > and the $sort_str comes in like > > $sort_by = $_POST['sort_by']; > $desc_asc = $_POST['desc_asc']; > $sort_str = " ORDER BY ".$sort_by." ".$desc_asc; > > > The query then just goes like > $do_q = mysql_query($s_query) or die(mysql_error()); > > and that's it... no errors shown, just the regular output which I had > before I put the new fields in there. So no changes to what I've had > before... but there should be changes *g* actually there seems to be no problem with your query (besides that you should check posted values first in order to avoid SQL injection) you said in your first letter that "$_POST['var'] don't reach the script" - I would guess the relevant part is not the query but rather the form itself... greets Zoltán Németh > > I hope anybody can find some sense in what I'm writing here... hardly makes > sense to me :oP > > Cheers! > > > > > > > > - Original Message - > From: "Zoltán Németh" <[EMAIL PROTECTED]> > To: "Christian Haensel" <[EMAIL PROTECTED]> > Cc: > Sent: Monday, May 21, 2007 9:36 AM > Subject: Re: [PHP] PHP & MySQL Problem > > > > 2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta: > >> Good morning friends, > >> > >> I have a script that collects data from a form and puts together a mysql > >> query to search a database. > >> Now, everything worked fine until I added a few new form fields... now > >> the > >> $_POST['var'] don't reach the script... > >> > >> I have about 20 to 25 form fields which are all taken into the query... > >> > >> Now my question: is there a limit in the fields that I can use in the > >> query > >> string to query the database? Somehow the script doesn't even output the > >> value of the POST data anymore... been using this stuff for years now, > >> and > >> i'm feeling really silly at the moment. > > > > AFAIK there is no limit in the number of fields in a query... > > post some code please, otherwise I don't think anyone will be able to > > help you > > > > greets > > Zoltán Németh > > > >> > >> I'd appreciate any help. > >> > >> Cheers! > >> Chris > >> > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & MySQL Problem
Right, here we go... this page has about 1000 lines of code, so here the relevant stuff. $s_query = "SELECT * FROM database WHERE kategorie LIKE '$s_cat' AND marke LIKE '$s_marke' AND leistung_kw >= '$kw_von' AND leistung_kw <= '$kw_bis' AND preis >= '$s_preis_von' AND preis <= '$s_preis_bis'".$checkboxes.$sort_str; I get the $checkboxes from the POST checkboxes, which looks like this (an example): $kraftstoffart = $_POST['fueltype']; if($kraftstoffart == "3") { $checkboxes .= ""; }elseif($kraftstoffart == "2") { $checkboxes .= " AND kraftstoffart = '2'"; }elseif($kraftstoffart == "1") { $checkboxes .= " AND kraftstoffart = '1'"; } and the $sort_str comes in like $sort_by = $_POST['sort_by']; $desc_asc = $_POST['desc_asc']; $sort_str = " ORDER BY ".$sort_by." ".$desc_asc; The query then just goes like $do_q = mysql_query($s_query) or die(mysql_error()); and that's it... no errors shown, just the regular output which I had before I put the new fields in there. So no changes to what I've had before... but there should be changes *g* I hope anybody can find some sense in what I'm writing here... hardly makes sense to me :oP Cheers! - Original Message - From: "Zoltán Németh" <[EMAIL PROTECTED]> To: "Christian Haensel" <[EMAIL PROTECTED]> Cc: Sent: Monday, May 21, 2007 9:36 AM Subject: Re: [PHP] PHP & MySQL Problem 2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta: Good morning friends, I have a script that collects data from a form and puts together a mysql query to search a database. Now, everything worked fine until I added a few new form fields... now the $_POST['var'] don't reach the script... I have about 20 to 25 form fields which are all taken into the query... Now my question: is there a limit in the fields that I can use in the query string to query the database? Somehow the script doesn't even output the value of the POST data anymore... been using this stuff for years now, and i'm feeling really silly at the moment. AFAIK there is no limit in the number of fields in a query... post some code please, otherwise I don't think anyone will be able to help you greets Zoltán Németh I'd appreciate any help. Cheers! Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP & MySQL Problem
2007. 05. 21, hétfő keltezéssel 09.26-kor Christian Haensel ezt írta: > Good morning friends, > > I have a script that collects data from a form and puts together a mysql > query to search a database. > Now, everything worked fine until I added a few new form fields... now the > $_POST['var'] don't reach the script... > > I have about 20 to 25 form fields which are all taken into the query... > > Now my question: is there a limit in the fields that I can use in the query > string to query the database? Somehow the script doesn't even output the > value of the POST data anymore... been using this stuff for years now, and > i'm feeling really silly at the moment. AFAIK there is no limit in the number of fields in a query... post some code please, otherwise I don't think anyone will be able to help you greets Zoltán Németh > > I'd appreciate any help. > > Cheers! > Chris > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
if I asked you whether your wife/girlfriend enjoyed having sex with your best friend while you are at work then you may or may not know the answer but it is hopefully clear that this is not the list to ask such a question (but no doubt that there is a list somewhere that caters to that kind of shit) ... conceptually what goes for your other half also goes for SQL. ha ha thats funny, but true and well explained :) - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
cajbecu wrote: clive wrote: Me2resh Lists wrote: the query is : $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list"; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. so, you don`t know the answer, right? cajb. Well if I understand the question correctly, then yes I could have an answer. I have solved something similar a while back, unfortunately I don't remember the correct sql and would have too populate a db table and try a few sql commands which is something me2resh should do until he gets the correct results. clive -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
cajbecu wrote: > clive wrote: >> Me2resh Lists wrote: >>> the query is : >>>$SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' >>> LIMIT $startingID,$items_numbers_list"; >> the only php I see it $SQL,$startingID,$items_numbers_list. This is a >> mysql question. >> > > so, you don`t know the answer, right? maybe he does maybe he doesn't - the point is trying to educate people as to the best/correct place to ask questions. questions related purely to SQL should be dealt with else where in cyberspace. if I asked you whether your wife/girlfriend enjoyed having sex with your best friend while you are at work then you may or may not know the answer but it is hopefully clear that this is not the list to ask such a question (but no doubt that there is a list somewhere that caters to that kind of shit) ... conceptually what goes for your other half also goes for SQL. > > cajb. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
clive wrote: > Me2resh Lists wrote: >> the query is : >>$SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' >> LIMIT $startingID,$items_numbers_list"; > > the only php I see it $SQL,$startingID,$items_numbers_list. This is a > mysql question. > so, you don`t know the answer, right? cajb. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php-mysql problem
> i need help regarding a sql query in my php app. > > the query is : > $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE > Voted = 'yes' > LIMIT $startingID,$items_numbers_list"; > > i want to sort this query by the number of the repeated EMail counts. > can anyone help me with that please ? A) Is this a PHP question? If so, please post the PHP code you are having trouble with. B) While you could dump the results of your query into an array, and use sort() or the other array sorting methods to sort it any way you wanted to (thus making this a PHP question), it would certainly be more efficient to have MySQL return a properly sorted result set to begin with. C) It appears that by your use of DISTINCT(), you will not have repeating EMail values in your result set, thus you could not sort it by repeating emails. D) You will find many more relevant answers and many more willing participants if you were to post your question to a MySQL oriented list. JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
Me2resh Lists wrote: the query is : $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' LIMIT $startingID,$items_numbers_list"; the only php I see it $SQL,$startingID,$items_numbers_list. This is a mysql question. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
Me2resh Lists wrote: > hi > i need help regarding a sql query in my php app. > > the query is : >$SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes' > LIMIT $startingID,$items_numbers_list"; > > i want to sort this query by the number of the repeated EMail counts. > can anyone help me with that please ? somebody on a mysql mailing list per chance? you are trying to solve a problem that is purely related to SQL query building, this has nothing to do with php. I would suggest you check out the mysql manual and read up on 'GROUP BY', 'COUNT()' and 'ORDER BY' - from your question I am guessing that these three hold the answer to your problem between them > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql problem
On Tue, May 2, 2006 5:00 am, Ross wrote: > CREATE TABLE `mytable` ( > `id` int(4) NOT NULL auto_increment, > `fileName` varchar(50) NOT NULL default '', > PRIMARY KEY (`id`) > ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; > > > when I add items they go id 1,2,3 etc. Whn I delete them gaps appear. > 1, 3, > 7. I need to know > > (a) when items are removed how can I sort the database to all the gaps > are > take out 1, 3, 7 becomes 1,2,3 You do *NOT* want to do this on an auto_increment field in a relational database. It's just a Bad Idea in so many ways... For starters, you're going to need that 'id' field in a bunch of other tables to relate the two tables -- That's kinda why they call it a RELATIONAL database. So if you re-number this table, you have to go through all the other tables related to this table and update them as well. You're looking at a cascading nightmare of updates. > (b) allow the ids to be changed so the items can change position in > the > list. If I change id 3 to id 1 then everything else shifts down. > > If anyone has seen the amazon dvd rental list where you can swap dvd > to the > top of the list and delete this is what I am trying to achive with > php/mysql. THAT is another kettle of fish entirely. You pretty much just need to manage the numbering on a different column "by hand" create table mytable(id int(11) auto_increment, rank int(4)); Queries you will find useful: //The rank for the new item added to end of list: select max(rank) + 1 from mytable; //Queries to move to top of list: $id = /* get ID of row here */ $rank = /* get current $rank of that row here */ update mytable set rank = rank + 1 where rank < $rank update mytable set rank = 1 where id = $id It's easy to mess up and get everything "off by one" but this is not rocket science to figure out and debug. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql problem
Ross wrote: This is my database now...I will use the item_id for the order but what if I want to change item_id 3 to item id 1? How can I push all the items down one place? How can I delete any gaps when items are deleted. CREATE TABLE `board_papers` ( `id` int(4) NOT NULL auto_increment, `doc_date` varchar(10) NOT NULL default '-00-00', `article_type` enum('agenda','minutes','paper') NOT NULL default 'agenda', `fileName` varchar(50) NOT NULL default '', `fileSize` int(4) NOT NULL default '0', `fileType` varchar(50) NOT NULL default '', `content` blob NOT NULL, `item_id` int(10) default NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; -- snip -- Hi Ross, You can reuse item_id after they have been deleted. So when you delete item_id = 1, then next time you perform an insert, lookup the lowest free item_id number and give it as the item_id. That's one small solution. If you actually want to rank your records by more than just the item_id, then define a field for each kind of rank you want, or better, add it as a separate table, like: board_papers -< rank * id * board_papers_fk <-- id from board_papers * rank_type (example: readability, technicality...) * rank_no (rank within the rank type) Then you can order the board_papers after rank as you like! Just an idea :) Enjoy, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql problem
Ross wrote: This is my database now...I will use the item_id for the order but what if I want to change item_id 3 to item id 1? How can I push all the items down one place? How can I delete any gaps when items are deleted. CREATE TABLE `board_papers` ( `id` int(4) NOT NULL auto_increment, `doc_date` varchar(10) NOT NULL default '-00-00', `article_type` enum('agenda','minutes','paper') NOT NULL default 'agenda', `fileName` varchar(50) NOT NULL default '', `fileSize` int(4) NOT NULL default '0', `fileType` varchar(50) NOT NULL default '', `content` blob NOT NULL, `item_id` int(10) default NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; -- snip -- Hi Ross, You can reuse item_id after they have been deleted. So when you delete item_id = 1, then next time you perform an insert, lookup the lowest free item_id number and give it as the item_id. That's one small solution. If you actually want to rank your records by more than just the item_id, then define a field for each kind of rank you want, or better, add it as a separate table, like: board_papers -< rank * id * board_papers_fk <-- id from board_papers * rank_type (example: readability, technicality...) * rank_no (rank within the rank type) Then you can order the board_papers after rank as you like! Just an idea :) Enjoy, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql problem
Depending on your needs, here is another tack to think about (I know, everyone else will be gasping and running for air...) A few years ago I had to make a shopping cart. I had an archaic system that would not share information with my web/db server, so I had to write a query to dump the products, quantity, price levels, etc out of it to a CSV file. I then used perl to get the file, reformat it into SQL files, then run an empty of the table and recreate with all the data that I just got off the server. To get past the naming conventions and such and NOT lose any linked tables, I did my joins and such off the product ID. The Caveat to this was that the products (even those we no longer sold) stayed in the system for about 6 months, and by the time we were ready to purge those, the orders were saved and could not be deleted (PDF and as saved data) so that was never a problem. That solved the product counts for me (since the bosses were a bit anal about having accurate product counts and such) and kept that table tidy. Customers was not so tidy, nor wore the other tables. But you can only work with what you can do. In short, unless you have a very good reason and safety checks to keep your data from getting lost from other tables, you might need to rethink why you want that. If you want to chew the fat and talk design, shoot me a message off-list and I'll be glad to help. Wolf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php mysql problem
At 11:00 AM +0100 5/2/06, Ross wrote: Just say I have a db CREATE TABLE `mytable` ( `id` int(4) NOT NULL auto_increment, `fileName` varchar(50) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; when I add items they go id 1,2,3 etc. Whn I delete them gaps appear. 1, 3, 7. I need to know (a) when items are removed how can I sort the database to all the gaps are take out 1, 3, 7 becomes 1,2,3 Ross: I am sure that the advice of everyone here and on any mysql list will be NOT to do what you are asking. You're looking at the ID as if the order of that field means something, it shouldn't. However, to provide you with what you asked for, please review: /* Renumber the Existing Sequence alter table mytable drop id, add id int unsigned not null auto_increment, auto_increment = 1; Keep in mind that by doing this, your dB should remain flat -- you cannot successfully renumber a relational dB without also considering all the dependant tables, which is not trivial. HTH's more than it hurts. tedd -- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php - mysql problem
thanks a lot for your posting, [cut] Posted by Fred Mitchell on December 11 2004 2:47pm [Delete] [Edit] Let's say you are doing a LEFT JOIN with a table that shares a column name in common with another table, and that you are selecting for instances where the join is missing, that is IS NULL. Normally, the common column name is "wiped out" by the null record, but here is a workaround for it: You simply alias that common column name in the select. For instance, CREATE TABLE t1 (INT id NOT NULL, ); CREATE TABLE t2 (INT id NOT NULL, ); ... SELECT * FROM t1 LEFT JOIN t2 ON t1.id = t2.id WHERE t2.id IS NULL; would result in the column 'id' being null on each selected row. Instead, you can do: SELECT *, t1.id AS id FROM t1 LEFT JOIN t2 ON t1.id = t2.id WHERE t2.id IS NULL; And now the 'id' column will be preserved since the alias is evaluated *after* the LEFT JOIN. [/cut] pay attention to: -> *, t1.id <- cheers, cajbecu Jay Blanchard wrote: > [snip] > $sql = "SELECT * FROM `table1` LEFT JOIN `table2` USING `id` WHERE ... > GROUP BY `table1`.`id`"; > > mysql_query($sql); > > the problem is, that, when in table2 is not matching data using that id, > i lose that id from output array. but i don`t want to.. is there any > posibility to keep that id? > [/snip] > > More of a mysql question but do a left outer join with no group by > statement. > > SELECT table2.* > FROM table1 LEFT OUTER JOIN table2 > ON(table1.id = table2.id) > WHERE table1.id IS NULL > > > Returns all of table2 id's where there is no id in table1 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php - mysql problem
[snip] > SELECT table1., *table2.* > FROM table1 LEFT OUTER JOIN table2 > ON(table1.id = table2.id) [/snip] Oops, typo. SELECT table1.*, table2.* FROM table1 LEFT OUTER JOIN table2 ON(table1.id = table2.id) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php - mysql problem
[snip] table1 id name value table2 id x y i want to id name value x y but there is no id from table 2 that is in table2.id and i want the resource to bu something like this: id(from table 1) name value (empty) (empty) > SELECT table2.* > FROM table1 LEFT OUTER JOIN table2 > ON(table1.id = table2.id) > WHERE table1.id IS NULL [/snip] > SELECT table1., *table2.* > FROM table1 LEFT OUTER JOIN table2 > ON(table1.id = table2.id) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php - mysql problem
thanks for your posting, but I have: table1 id name value table2 id x y i want to id name value x y but there is no id from table 2 that is in table2.id and i want the resource to bu something like this: id(from table 1) name value (empty) (empty) Jay Blanchard wrote: > [snip] > $sql = "SELECT * FROM `table1` LEFT JOIN `table2` USING `id` WHERE ... > GROUP BY `table1`.`id`"; > > mysql_query($sql); > > the problem is, that, when in table2 is not matching data using that id, > i lose that id from output array. but i don`t want to.. is there any > posibility to keep that id? > [/snip] > > More of a mysql question but do a left outer join with no group by > statement. > > SELECT table2.* > FROM table1 LEFT OUTER JOIN table2 > ON(table1.id = table2.id) > WHERE table1.id IS NULL > > > Returns all of table2 id's where there is no id in table1 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php - mysql problem
[snip] $sql = "SELECT * FROM `table1` LEFT JOIN `table2` USING `id` WHERE ... GROUP BY `table1`.`id`"; mysql_query($sql); the problem is, that, when in table2 is not matching data using that id, i lose that id from output array. but i don`t want to.. is there any posibility to keep that id? [/snip] More of a mysql question but do a left outer join with no group by statement. SELECT table2.* FROM table1 LEFT OUTER JOIN table2 ON(table1.id = table2.id) WHERE table1.id IS NULL Returns all of table2 id's where there is no id in table1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
Jianping Zhu wrote: Thank you for your response. I get the php rpm distributed with redhat 9.0. Do I have to recompile phd instead from source code with mysql support? Thanks You need to install the php-mysql rpm. It will be on one of your Red Hat Discs. -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
Thank you for your response. I get the php rpm distributed with redhat 9.0. Do I have to recompile phd instead from source code with mysql support? Thanks On Thu, May 13, 2004 at 06:15:23PM +0200, Oliver Hankeln wrote: > Hello, > > [snip] > > > but i got error message with: > > http://coopunit.forestry.uga.edu:8080/testdb.php > > the error is: > > Fatal error: Call to undefined function: > > mysql_connect() in /var/www/html/testdb.php on line 13 > > > > How can Fix this problem? Thanks > > [/snip] > > > Your PHP is compiled without mysql support (see > http://coopunit.forestry.uga.edu:8080/test.php) You do however have dbx > support. You might want to look at http://de.php.net/manual/de/ref.dbx.php > Your mysql_connect has to be replaced by dbx_connect and so on... > Alternativly you could recompile php with mysql support. > > HTH, > Oliver Hankeln > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-mysql problem
Hello, [snip] but i got error message with: http://coopunit.forestry.uga.edu:8080/testdb.php the error is: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/testdb.php on line 13 How can Fix this problem? Thanks [/snip] Your PHP is compiled without mysql support (see http://coopunit.forestry.uga.edu:8080/test.php) You do however have dbx support. You might want to look at http://de.php.net/manual/de/ref.dbx.php Your mysql_connect has to be replaced by dbx_connect and so on... Alternativly you could recompile php with mysql support. HTH, Oliver Hankeln -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP /MySQL problem on SMP machines
Hi Curt, Thanks for your email - please find answers below: Regards -- Lasse Laursen · VP, Hosting Technology · NetGroup A/S St. Kongensgade 40H · DK-1264 Copenhagen K, Denmark Phone: +45 3370 1526 · Fax: +45 3313 0066 - Don't be fooled by cheap finnish imitations - BSD is the One True Code - Original Message - From: "Curt Zirzow" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 25, 2004 5:52 PM Subject: Re: [PHP] PHP /MySQL problem on SMP machines > * Thus wrote Lasse Laursen ([EMAIL PROTECTED]): > > Hi all, > > > > We just installed PHP 4.3.6 on FreeBSD 5.2.1 on some SMP machines and we are > > experiencing some weird problems. > > > >... > > > > The database backend is MySQL 4.0.18 and is run on a seperate dedicated > > server. > > What mysqlclient is php linked to? > php -i | grep "Client API" > > I would make sure you're using a 4.x version. webnode2# ./php -i | grep "Client API" Client API version 3.23.49 That could be one of the problems - how do I specify that I wish to use the 4.x API? > > Last night some problems occured - when we queried the databases for simple > > queries that _should_ return some rows (and worked minutes before) the > > database simply returned 0 rows. A restart og the mysqld and the php > > processes solved the problems but they return at random. > > A couple things to check: > - the output of mysql_error(), it usually solves 90% of query > problems. > > - if myismchk was ran on the table(s) mysql can get confused > about the indexes (until the table(s) are flushed) No errors occur that give an mysql_error at any time. Queries on the database simply returns the "wrong" information... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP /MySQL problem on SMP machines
* Thus wrote Lasse Laursen ([EMAIL PROTECTED]): > Hi all, > > We just installed PHP 4.3.6 on FreeBSD 5.2.1 on some SMP machines and we are > experiencing some weird problems. > >... > > The database backend is MySQL 4.0.18 and is run on a seperate dedicated > server. What mysqlclient is php linked to? php -i | grep "Client API" I would make sure you're using a 4.x version. > > Last night some problems occured - when we queried the databases for simple > queries that _should_ return some rows (and worked minutes before) the > database simply returned 0 rows. A restart og the mysqld and the php > processes solved the problems but they return at random. A couple things to check: - the output of mysql_error(), it usually solves 90% of query problems. - if myismchk was ran on the table(s) mysql can get confused about the indexes (until the table(s) are flushed) Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP,MySQL problem
Hello Nicolai, Wednesday, January 14, 2004, 12:14:09 PM, you wrote: NE> Sorry, I should have done that from the beginning, but here it is. I have NE> looked further on the variables and it seams like the name attribute NE> "sumbit" (in the ) is not converted to the $submit variable when I NE> if ($submit) { You probably have Register Globals turned off (you should do anyway, PHP by default has this setting now). That article looks like it assumed they were turned on. Simple solution: if ($_POST['submit']) You'll need to do this for each variable you want to use that comes in via the form. -- Best regards, Richardmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP, MySQL problem
> So, does anybody know what I the problem might be? Hi, Well you need to post the code so one can see what's the problem Humberto Silva World Editing Portugal -Original Message- From: Nicolai Elmqvist [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 14 de Janeiro de 2004 0:11 To: [EMAIL PROTECTED] Subject: [PHP] PHP, MySQL problem Hi I have just started working with PHP and MySQL and have gone through 3 tutorials on how to add and delete records from a database. Nearly everything is working, as it should except for the communication between HTML and PHP. If I try to add a record to my database by pushing a "submit" the text in the textboxes are deleted but no record is inserted in the database. I have copied the code directly form the tutorials so spelling mistakes should not be the problem. It is possible to add records manually in the code so the connection to and from the database is ok. So, does anybody know what I the problem might be? I'm using PHP 4.3.4, MySQL 4.0.17 and an Apache server. On before hand, thank you. Nicolai Elmqvist -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP-Mysql problem
> I just installed RedHat Linux 9.0 with Apache/Php/MySql for a project. I > have Apache and PHP running. However, PHP does not have the Mysql module?? > installed and this is the key to our project. Could someone point me in the > right direction to recompile PHP with proper MySql module included?? I am a > EXTREME newbie when it comes to compiling anything in Linux. Did you install apache/php/mysql as rpms? If you did then all you need to do is install the php-mysql rpm. -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP-Mysql problem
This is a good tutorial and it starts off with installiing php and mysql http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html Robin Kopetzky wrote: Good Afternoon!! I just installed RedHat Linux 9.0 with Apache/Php/MySql for a project. I have Apache and PHP running. However, PHP does not have the Mysql module?? installed and this is the key to our project. Could someone point me in the right direction to recompile PHP with proper MySql module included?? I am a EXTREME newbie when it comes to compiling anything in Linux. Robin 'Sparky' Kopetzky Black Mesa Computers/Internet Service Grants, NM 87020 -- +-+-++ | Blake Schroeder | Owner/Developer |lhwd.net| +--(http://www.lhwd.net)+--/3174026352\--+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP + MySQL problem (strange behavior)
Unfortunately, mysql returns no error string. MySQL doesn't appear to think it's an error, as it does apply changes to the row I'm trying to change, it simple isn't applying the CORRECT change to said row :) -Javier -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 05, 2001 4:59 PM To: Javier Muniz; '[EMAIL PROTECTED]' Subject: Re: [PHP] PHP + MySQL problem (strange behavior) On Thu, 6 Dec 2001 08:32, Javier Muniz wrote: > Hello, > > I'm having trouble determining what's going wrong with a MySQL query > that I'm doing from PHP. Now before you go blaming MySQL read on :) > > I have a table with the following columns: > id (int) > name (varchar 20) > starttime (int) > duration (int) > > now, i have a row that has a starttime of 60, when i attempt to do the > following update with PHP, it sets it to 0: > > "UPDATE mytable SET starttime=starttime-30 WHERE name = 'myname'" > > but when I run it from the MySQL command line, copy/pasted from the > code, it sets the value of starttime to 30 as expected. > > Anyone have any clue why this is? mysql_error() is a good debugging tool; it will return an error string that may be useful. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA A waist is a terrible thing to mind. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP + MySQL problem (strange behavior)
On Thu, 6 Dec 2001 08:32, Javier Muniz wrote: > Hello, > > I'm having trouble determining what's going wrong with a MySQL query > that I'm doing from PHP. Now before you go blaming MySQL read on :) > > I have a table with the following columns: > id (int) > name (varchar 20) > starttime (int) > duration (int) > > now, i have a row that has a starttime of 60, when i attempt to do the > following update with PHP, it sets it to 0: > > "UPDATE mytable SET starttime=starttime-30 WHERE name = 'myname'" > > but when I run it from the MySQL command line, copy/pasted from the > code, it sets the value of starttime to 30 as expected. > > Anyone have any clue why this is? mysql_error() is a good debugging tool; it will return an error string that may be useful. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA A waist is a terrible thing to mind. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]