Re: [PHP] mysql input

2008-02-19 Thread Richard Lynch
On Mon, February 18, 2008 10:05 pm, nihilism machine wrote: > I have a user saving a VARCHAR(255) field in a mysql db which has > single quotes in the text, how can i replace them so that they dont > fuck up my mysql command? http://php.net/mysql_real_escape_string Google for "SQL injection" for

[PHP] MySQL Stored Procedures

2008-02-19 Thread admin
I want to thank all who helped me on this issue. My Problem was when I tried to return a parameter to the C++ script. CREATE PROCEDURE `tracinsert`(CaldNumber varchar(12), CaldTime varchar(50), CallerID varchar(12)) BEGIN INSERT INTO IncCalls (CaldNumber, CaldTime, CallerID) VALUES (CaldNumber,

RE: [PHP] mysql input

2008-02-19 Thread Bastien Koert
I agree, but they all provide some level of handling just might not be the 'most correct' way of handling it bastien> Subject: RE: [PHP] mysql input> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: [EMAIL PROTECTED]; php-general@lists.php.net> Date: Mon, 18

RE: [PHP] mysql input

2008-02-18 Thread Robert Cummings
On Mon, 2008-02-18 at 23:19 -0500, Bastien Koert wrote: > mysql_real_escape_string() > addslashes() > htmlentities() > > take your pick That's a bad answer. If he's using MySQL then he SHOULD use mysql_real_escape_string(). None of the other functions will fully protect him from malicious input

RE: [PHP] mysql input

2008-02-18 Thread Bastien Koert
mysql_real_escape_string() addslashes() htmlentities() take your pick bastien > From: [EMAIL PROTECTED]> To: php-general@lists.php.net> Date: Mon, 18 Feb > 2008 23:05:10 -0500> Subject: [PHP] mysql input> > I have a user saving a > VARCHAR(255) field in a mys

Re: [PHP] mysql input

2008-02-18 Thread Robert Cummings
On Mon, 2008-02-18 at 23:05 -0500, nihilism machine wrote: > I have a user saving a VARCHAR(255) field in a mysql db which has > single quotes in the text, how can i replace them so that they dont > fuck up my mysql command? mysql_real_escape_string() Cheers, Rob. -- .--

[PHP] mysql input

2008-02-18 Thread nihilism machine
I have a user saving a VARCHAR(255) field in a mysql db which has single quotes in the text, how can i replace them so that they dont fuck up my mysql command? -e -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-18 Thread Richard Lynch
On Sat, February 16, 2008 5:22 pm, Rob Gould wrote: > I've got a PHP script that inserts "00012345678" into a record in a > mySQL database (it's a barcode). Things work ok unless the number has > preceding zeros, and then the zeros get cut off and all I get is > "12345678". > > I have the mySQL da

Re: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-17 Thread Nathan Rixham
Daniel Brown wrote: On Feb 16, 2008 6:22 PM, Rob Gould <[EMAIL PROTECTED]> wrote: I've got a PHP script that inserts "00012345678" into a record in a mySQL database (it's a barcode). Things work ok unless the number has preceding zeros, and then the zeros get cut off and all I get is "1234567

Re: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-17 Thread Daniel Brown
On Feb 16, 2008 6:22 PM, Rob Gould <[EMAIL PROTECTED]> wrote: > I've got a PHP script that inserts "00012345678" into a record in a mySQL > database (it's a barcode). Things work ok unless the number has preceding > zeros, and then the zeros get cut off and all I get is "12345678". > > I have th

Re: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-16 Thread Emilio Astarita
Rob Gould <[EMAIL PROTECTED]> writes: > I've got a PHP script that inserts "00012345678" into a record in a > mySQL database (it's a barcode). Things work ok unless the number has > preceding zeros, and then the zeros get cut off and all I get is > "12345678". > > I have the mySQL database fieldt

RE: [PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-16 Thread Bastien Koert
char(14) is a better data type bastien > Date: Sat, 16 Feb 2008 15:22:17 -0800 > From: [EMAIL PROTECTED] > To: php-general@lists.php.net > Subject: [PHP] PHP/mySQL dropping zeros after inserting number into record > > I've got a

[PHP] PHP/mySQL dropping zeros after inserting number into record

2008-02-16 Thread Rob Gould
I've got a PHP script that inserts "00012345678" into a record in a mySQL database (it's a barcode). Things work ok unless the number has preceding zeros, and then the zeros get cut off and all I get is "12345678". I have the mySQL database fieldtype set to bigint(14). If the maximum length a

Re: [PHP] mysql question #2

2008-02-14 Thread Richard Heyes
At any rate, just seeing this tells me that you've got a real mess on your hands... Or you could say, "You're going to have some fun cleaning that". -- Richard Heyes http://www.websupportsolutions.co.uk Knowledge Base and Helpdesk software hosted for you - no installation, no maintenance, new

Re: [PHP] mysql question

2008-02-14 Thread Richard Lynch
On Sun, February 10, 2008 11:52 am, Per Jessen wrote: > nihilism machine wrote: > >> $ret = mysql_result($r, 0); >> mysql_free_result($r); >> if ($this->auto_slashes) return stripslashes($ret); >> else return $ret; >> } >> >> >> what is $ret, an array? > > No, it's a mysql result object. No, it'

Re: [PHP] mysql question #2

2008-02-14 Thread Richard Lynch
On Sun, February 10, 2008 12:12 pm, nihilism machine wrote: > public function select_one($sql) { > if ($this->auto_slashes) { > return stripslashes($ret); If you have to call stripslashes() on data coming FROM MySQL, then you have really messed up... You

Re: [PHP] open source PHP/MySQL image viewing application

2008-02-14 Thread Richard Lynch
Did you Google for "PHP MySQL photo album" or "PHP MySQL slideshow"??? On Thu, February 14, 2008 2:12 pm, Bruce Gilbert wrote: > can anyone reccomend an open source PHP/MySQL based image viewing > application. I am looking to store the images in MySQL and have a >

[PHP] open source PHP/MySQL image viewing application

2008-02-14 Thread Bruce Gilbert
can anyone reccomend an open source PHP/MySQL based image viewing application. I am looking to store the images in MySQL and have a viewer on the page with the option to click to the next image and back, possibly with the display of an enlarged image as well as the option to click on thumbnails

Re: [PHP] mysql question

2008-02-11 Thread Daniel Brown
On Feb 10, 2008 1:03 PM, Per Jessen <[EMAIL PROTECTED]> wrote: > Yep, you're right - I read mysql_query where the OP said mysql_result. Don't feel bad. I did the exact same thing when I was reading over the post just now. -- Daniel P. Brown Senior Unix Geek -- PHP General Mailing List

Re: [PHP] mysql question #2

2008-02-10 Thread Zoltán Németh
2008. 02. 10, vasárnap keltezéssel 13.12-kor nihilism machine ezt írta: > Ok, I read the php.net info. so with this function though: > > public function select_one($sql) { > $this->last_query = $sql; > $r = mysql_query($sql); > if (!$r) { >

Re: [PHP] mysql question #2

2008-02-10 Thread Nathan Nobbe
On Feb 10, 2008 1:12 PM, nihilism machine <[EMAIL PROTECTED]> wrote: > Ok, I read the php.net info. so with this function though: > >public function select_one($sql) { >$this->last_query = $sql; >$r = mysql_query($sql); >if (!$r) { >

[PHP] mysql question #2

2008-02-10 Thread nihilism machine
Ok, I read the php.net info. so with this function though: public function select_one($sql) { $this->last_query = $sql; $r = mysql_query($sql); if (!$r) { $this->last_error = mysql_error(); ret

Re: [PHP] mysql question

2008-02-10 Thread Per Jessen
Nathan Nobbe wrote: >> > what is $ret, an array? >> >> No, it's a mysql result object. >> > > no, its the contents of the first cell in the first record of the > result set; from the doc on mysql_result(), > http://www.php.net/manual/en/function.mysql-result.php > which is what the function is us

Re: [PHP] mysql question

2008-02-10 Thread Nathan Nobbe
On Feb 10, 2008 12:52 PM, Per Jessen <[EMAIL PROTECTED]> wrote: > nihilism machine wrote: > > > $ret = mysql_result($r, 0); > > mysql_free_result($r); > > if ($this->auto_slashes) return stripslashes($ret); > > else return $ret; > > } > > > > > > what is $ret, an array? > > No, it's a mysql result

Re: [PHP] mysql question

2008-02-10 Thread Per Jessen
nihilism machine wrote: > $ret = mysql_result($r, 0); > mysql_free_result($r); > if ($this->auto_slashes) return stripslashes($ret); > else return $ret; > } > > > what is $ret, an array? No, it's a mysql result object. > if so how can i access the individual rows in it? Look up mysql_fetch_a

[PHP] mysql question

2008-02-10 Thread nihilism machine
i have this functuon: public function select_one($sql) { $this->last_query = $sql; $r = mysql_query($sql); if (!$r) { $this->last_error = mysql_error(); return false; }

RE: [PHP] PHP/mySQL question about groups

2008-02-07 Thread Warren Vail
6 AM > To: PHP General list > Subject: Re: [PHP] PHP/mySQL question about groups > > On Feb 7, 2008 1:20 AM, Warren Vail <[EMAIL PROTECTED]> wrote: > > I did some looking into performance issues many years ago at company > that > > developed and marketed another databas

Re: [PHP] PHP/mySQL question about groups

2008-02-07 Thread Andrew Ballard
On Feb 7, 2008 1:20 AM, Warren Vail <[EMAIL PROTECTED]> wrote: > I did some looking into performance issues many years ago at company that > developed and marketed another database server, comparing the query plan to > the actual code, and a query plan usually shows the processes that consume > the

RE: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Warren Vail
Vail -Original Message- From: Andrew Ballard [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 06, 2008 8:41 PM To: PHP General list Subject: Re: [PHP] PHP/mySQL question about groups On Feb 6, 2008 11:20 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Feb 6, 2008 10:59 PM,

Re: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Andrew Ballard
On Feb 6, 2008 11:20 PM, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > On Feb 6, 2008 10:59 PM, Andrew Ballard <[EMAIL PROTECTED]> wrote: > > > Of course, in this case you could just avoid all the confusion with > > this statement as well: > > > > SELECT DISTINCT name, size > > FROMwine > > im not

Re: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Nathan Nobbe
On Feb 6, 2008 10:59 PM, Andrew Ballard <[EMAIL PROTECTED]> wrote: > Of course, in this case you could just avoid all the confusion with > this statement as well: > > SELECT DISTINCT name, size > FROMwine im not sure why, but i think distinct is typically way slower than group by. -nathan

Re: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Andrew Ballard
On Feb 6, 2008 8:46 PM, Rob Gould <[EMAIL PROTECTED]> wrote: > Let's say I have a PHP-based wine application, and it's taking a set of mySQL > data that looks like this: > > wineidname > size > 123 Sil

RE: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Bastien Koert
Select * from wine where name = 'Silver Oak' GROUP BY wineid,size bastien> Date: Wed, 6 Feb 2008 17:46:52 -0800> From: [EMAIL PROTECTED]> To: php-general@lists.php.net> Subject: [PHP] PHP/mySQL question about groups> > Let's say I have a PHP-based wine appl

Re: [PHP] PHP/mySQL question about groups

2008-02-06 Thread Nathan Nobbe
On Feb 6, 2008 8:46 PM, Rob Gould <[EMAIL PROTECTED]> wrote: > Let's say I have a PHP-based wine application, and it's taking a set of > mySQL data that looks like this: > > wineidname > size > 123 Silver Oak > 750ML > 123

[PHP] PHP/mySQL question about groups

2008-02-06 Thread Rob Gould
Let's say I have a PHP-based wine application, and it's taking a set of mySQL data that looks like this: wineidname size 123 Silver Oak 750ML 123

Re: [PHP] Mysql session handler?

2008-01-29 Thread Chris
Mike Yrabedra wrote: Can anyone recommend a good php-mysql session handler class? http://www.php.net/manual/en/function.session-set-save-handler.php#79706 looks ok. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubsc

[PHP] Mysql session handler?

2008-01-29 Thread Mike Yrabedra
Can anyone recommend a good php-mysql session handler class? I have found a lot of them, but they are all pretty old, pre-2005 -- Mike B^)> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mysql date question

2008-01-03 Thread Richard Lynch
On Thu, January 3, 2008 8:30 am, Adam Williams wrote: > I have a field in mysql as shown by describe contract; > > | length_start | date| YES | | NULL > || > > Which stores it in the mysql format of -MM-DD. However, I need > the > output of my selec

Re: [PHP] mysql date question

2008-01-03 Thread Silvio Porcellana
Uhm, a shot in the dark - try: select date_format(contract.length_start, '%m-%d-%Y') as length_start HTH, cheers! Silvio Adam Williams wrote: I have a field in mysql as shown by describe contract; | length_start | date| YES | | NULL || Which s

RE: [PHP] mysql date question

2008-01-03 Thread Bastien Koert
no need for quotes select date_format(contract.length_start, '%m-%d-%Y') as length_start from contract where user_id = 1; bastien > Date: Thu, 3 Jan 2008 08:30:55 -0600> From: [EMAIL PROTECTED]> To: > php-general@lists.php.net> Subject: [PHP] mysql date questio

RE: [PHP] mysql date question

2008-01-03 Thread Jay Blanchard
[snip] I have a field in mysql as shown by describe contract; | length_start | date| YES | | NULL || Which stores it in the mysql format of -MM-DD. However, I need the output of my select statement to show it in MM-DD- format. I can sel

Re: [PHP] mysql date question

2008-01-03 Thread Stut
Adam Williams wrote: select date_format('contract.length_start', '%m-%d-%Y') as length_start from contract where user_id = 1; This has nothing to do with PHP, but the first parameter to date_format should not be in quotes. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.p

[PHP] mysql date question

2008-01-03 Thread Adam Williams
I have a field in mysql as shown by describe contract; | length_start | date| YES | | NULL || Which stores it in the mysql format of -MM-DD. However, I need the output of my select statement to show it in MM-DD- format. I can select i

Re: [PHP] MySQL to blame? (was Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?)

2008-01-02 Thread Chris
M5 wrote: On 20-Dec-07, at 1:17 AM, Per Jessen wrote: René Fournier wrote: I'm really not sure what to try next. ps -aux shows MySQL as hogging the CPU, not PHP or Terminal: When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's doing. I have, and I can't see anything unusu

[PHP] MySQL to blame? (was Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?)

2007-12-20 Thread M5
On 20-Dec-07, at 1:17 AM, Per Jessen wrote: René Fournier wrote: I'm really not sure what to try next. ps -aux shows MySQL as hogging the CPU, not PHP or Terminal: When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's doing. I have, and I can't see anything unusual. There a

Re: [PHP] Incorporating a PHP/MySQL based search

2007-12-12 Thread Steve Finkelstein
Thanks Tedd... looks like a promising link. I'll take a look! On 12/12/07, tedd <[EMAIL PROTECTED]> wrote: > > At 5:36 PM -0500 12/8/07, Steve Finkelstein wrote: > >Hey folks, > > > >One area I lack experience in is writting a solution to index/search on a > >site. Would anyone be kind enough and

Re: [PHP] mysql DATE_FORMAT() question

2007-12-12 Thread Adam Williams
nevermind, I see I had a mistake in my mysql statement, I should of been: select DATE_FORMAT(testdate, '%m\-%d\-%Y') as date_column from testtable; please disregard. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql DATE_FORMAT() question

2007-12-12 Thread Adam Williams
I ran the commands: CREATE TABLE testtable ( testdate DATETIME); INSERT INTO testtable (testdate) VALUES (now()); and then I want to select it but format it to show the date only (not the time, and yes I know I could use DATE instead of DATETIME, but there may be cases where I need to show th

Re: [PHP] Incorporating a PHP/MySQL based search

2007-12-12 Thread tedd
At 5:36 PM -0500 12/8/07, Steve Finkelstein wrote: Hey folks, One area I lack experience in is writting a solution to index/search on a site. Would anyone be kind enough and point me in the right direction as far as any books which discuss some simple solutions or articles/blogs on the web? Clea

Re: [PHP] Incorporating a PHP/MySQL based search

2007-12-10 Thread Richard Lynch
On Sat, December 8, 2007 4:36 pm, Steve Finkelstein wrote: > One area I lack experience in is writting a solution to index/search > on a > site. Would anyone be kind enough and point me in the right direction > as far > as any books which discuss some simple solutions or articles/blogs on > the > w

Re: [PHP] Incorporating a PHP/MySQL based search

2007-12-08 Thread Cesar D. Rodas
Hello, This is quite simple, you need to have mysql table with "fulltext" index. The "hard work" is done by mysql, you need to learn a few of things about fulltext with mysql, for that you can google it. PHP is only used to send the query to mysql (in most of case but not always). Try to do som

[PHP] Incorporating a PHP/MySQL based search

2007-12-08 Thread Steve Finkelstein
Hey folks, One area I lack experience in is writting a solution to index/search on a site. Would anyone be kind enough and point me in the right direction as far as any books which discuss some simple solutions or articles/blogs on the web? Clearly I'm not looking for anything as complex as Google

[PHP] Annoying PHP - MySQL communication timeout

2007-11-07 Thread Mark Summers
Has anyone here experienced a problem where a MySQL server seemingly closes a connection opened by PHP whilst the PHP script is still running? The problem only seems to affect scripts that run for a long time but there are a few things that make it unusual: 1) There is no obvious correlation betw

Re: [PHP] MySQL and SVN

2007-10-25 Thread Emil Edeholt
Hi, Thanks for your answer. Are you sugesting - what I think is called - a multi-master replication? Since I would like to keep two sources in sync and want to be able to make changes on both servers. I know very little about replication. Maybe I'm making a bigger problem of this than it woul

[PHP] MySQL and SVN

2007-10-25 Thread Emil Edeholt
Hi all! Maybe slightly off topic, but I would like to know how you guys handle mysql structures between different computers (and for that matter from the developer desktop to the stable server). I work on my home and my office computer with the same php projects. I keep all my php files on s

Re: [PHP] MySQL connector installation/upgrade problems

2007-10-23 Thread David Christopher Zentgraf
On 23. Oct 2007, at 19:55, Martin Marques wrote: Wouldn't it be easier to upgrade to CentOS 5? We tried to explain that to our host, but their service *major expletive*, and other hosts in Tokyo ain't better either. :-( Chrs, Dav -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] MySQL connector installation/upgrade problems

2007-10-23 Thread Martin Marques
David Zentgraf escribió: Hi, I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5 installation + PHP4. I installed the MySQL 5 package, server and client, via RPMs and they work fine, the client tells me it's version 5.0.45. I went on to recompile PHP 4.4.7 --with-mysql, b

[PHP] MySQL connector installation/upgrade problems

2007-10-22 Thread David Zentgraf
Hi, I'm trying to upgrade a server running CentOS 3 to an up-to-date MySQL 5 installation + PHP4. I installed the MySQL 5 package, server and client, via RPMs and they work fine, the client tells me it's version 5.0.45. I went on to recompile PHP 4.4.7 --with-mysql, but it's still using M

[PHP] Re: PHP/MySQL CMS for Articles/Studies/Research Papers?

2007-10-19 Thread Colin Guthrie
Jason Paschal wrote: > just wanted to know if any of you have seen anything geared for this sort of > content, something professional-looking that doesn't come with a huge > learning curve. it wouldn't have to be TOO fancy, i could probably make > something, but didn't want to re-invent the round-

[PHP] PHP/MySQL CMS for Articles/Studies/Research Papers?

2007-10-18 Thread Jason Paschal
One of my clients is a veterinarian who performs research on the side. He wants to be able to post his papers online and let ppl comment and have discussions. he's not just a dabbler. the university of georgia is (was?) conducting clinical trials for his parvo cure that has already saved hundred

Re: [PHP] MySQL and SESSIONs

2007-10-08 Thread mike
On 10/8/07, Philip Thompson <[EMAIL PROTECTED]> wrote: > Hi. This may not be best practice, but I think it's great to use - > especially since I can use multiple functions with the same database > connection w/o having to send the db link/resource. Store the connection in > the GLOBALS variable - t

Re: [PHP] MySQL and SESSIONs

2007-10-08 Thread Philip Thompson
day, October 05, 2007 4:31 PM > > To: Stefano Esposito > > Cc: php-general@lists.php.net > > Subject: Re: [PHP] MySQL and SESSIONs > > > > > > Stefano Esposito wrote: > >> is it somehow possible to store the connection reference obtained from > mysql_

Re: [PHP] mySQL Results To XML -- my xmltag() functions

2007-10-06 Thread mike
On 10/6/07, Daevid Vincent <[EMAIL PROTECTED]> wrote: > Here's the 'functions_xml.inc.php' file I use, it has served me well and > handles I believe all tag cases, personally I'm a big fan of using the > attributes as they're most easily parsed out in the PHP DOM functions: I made this at one poi

RE: [PHP] mySQL Results To XML -- my xmltag() functions

2007-10-06 Thread Daevid Vincent
> -Original Message- > you could easily just print the xml manually. > > > foo > etc > > > or, i believe mysql will return XML output but i'm not sure a PHP > function exists to do that. > > no need to use fancy DOM functions, outputting XML is easy, parsing it > is when you need

Re: [PHP] mySQL Results To XML

2007-10-06 Thread mike
On 10/6/07, CK <[EMAIL PROTECTED]> wrote: > Hi, > > > Here's the mission, creating a movie DB, I need the results returned > from mySQL in an XML format for use with the FLASH Professional > DataGrid. Any tips on formating mySQL results would be grand. Here's > the structure of the DB, if needed.

[PHP] mySQL Results To XML

2007-10-06 Thread CK
Hi, Here's the mission, creating a movie DB, I need the results returned from mySQL in an XML format for use with the FLASH Professional DataGrid. Any tips on formating mySQL results would be grand. Here's the structure of the DB, if needed. DVD Table *Title ID *Title *Genre *Actor *Di

[PHP] mySQL Results To XML

2007-10-06 Thread CK
Hi, Here's the mission, creating a movie DB, I need the results returned from mySQL in an XML format for use with the FLASH Professional DataGrid. Any tips on formating mySQL results would be grand. Here's the structure of the DB, if needed. DVD Table *Title ID *Title *Genre *Actor *Di

Re: [PHP] MySQL and SESSIONs

2007-10-05 Thread Stut
hit the DB unless you really need to. -Stut -- http://stut.net/ -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Friday, October 05, 2007 4:31 PM To: Stefano Esposito Cc: php-general@lists.php.net Subject: Re: [PHP] MySQL and SESSIONs Stefano Esposito wrote: is it someho

RE: [PHP] MySQL and SESSIONs

2007-10-05 Thread Vo, Lance
Stut What's good for multiple webservers? thanks -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Friday, October 05, 2007 4:31 PM To: Stefano Esposito Cc: php-general@lists.php.net Subject: Re: [PHP] MySQL and SESSIONs Stefano Esposito wrote: > is it somehow pos

Re: [PHP] MySQL and SESSIONs

2007-10-05 Thread Stut
Stefano Esposito wrote: is it somehow possible to store the connection reference obtained from mysql_connect() (note the absence of the "i") in a $_SESSION element? No. Why would you want to? You'd end up holding on to a database connection even when nothing is using it. If you want to optimi

[PHP] MySQL and SESSIONs

2007-10-05 Thread Stefano Esposito
Hi all, is it somehow possible to store the connection reference obtained from mysql_connect() (note the absence of the "i") in a $_SESSION element? -- Stefano Esposito -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Problemi di Liquidità? Con Logos

RE: [PHP] MySQL Identifying worst-performing codes

2007-10-04 Thread Jay Blanchard
[snip] There is  a tool call "idera" (SQL diagnostic manager). Basically it is a performance monitoring and diagnostics tool. It has a feature;  Identifying of worst-performing codes - Identifies performance bottlenecks such as the worst-performing stored procedures, long-running queries, mos

[PHP] MySQL Identifying worst-performing codes

2007-10-04 Thread Lasitha Alawatta
Hello friends, There is a tool call "idera" (SQL diagnostic manager). Basically it is a performance monitoring and diagnostics tool. It has a feature; Identifying of worst-performing codes - Identifies performance bottlenecks such as the worst-performing stored procedures, long-ru

Re: [PHP] MySQL upload problem (solved)

2007-09-13 Thread tedd
tedd wrote: I was thinking that I could ftp the sql file to the clients server and then run a php script on his server, something like: $sql = "mysql -h$dbhost -u$dbuser -p$dbpass $dbname < $filename"; system($sql); But, that didn't work -- however -- using mysqldump did download the file. S

Re: [PHP] MySQL upload problem

2007-09-11 Thread brian
brian wrote: tedd wrote: I was thinking that I could ftp the sql file to the clients server and then run a php script on his server, something like: $sql = "mysql -h$dbhost -u$dbuser -p$dbpass $dbname < $filename"; system($sql); But, that didn't work -- however -- using mysqldump did downlo

Re: [PHP] MySQL upload problem

2007-09-11 Thread brian
Chris wrote: tedd wrote: I was thinking that I could ftp the sql file to the clients server and then run a php script on his server, something like: $sql = "mysql -h$dbhost -u$dbuser -p$dbpass $dbname < $filename"; system($sql); But, that didn't work -- however -- using mysqldump did downl

Re: [PHP] MySQL upload problem

2007-09-11 Thread Chris
tedd wrote: At 4:46 PM +0100 9/11/07, Stut wrote: tedd wrote: I know that this is not a php question, but all of you are so smart I thought would ask anyway. I need to upload a 5 Meg sql file to a client's database. However, his site's phpMyAdmin shows a maximum file size limit of 2 Meg. N

Re: [PHP] MySQL upload problem

2007-09-11 Thread brian
tedd wrote: I was thinking that I could ftp the sql file to the clients server and then run a php script on his server, something like: $sql = "mysql -h$dbhost -u$dbuser -p$dbpass $dbname < $filename"; system($sql); But, that didn't work -- however -- using mysqldump did download the file. S

Re: [PHP] MySQL upload problem

2007-09-11 Thread Chris
tedd wrote: At 4:46 PM +0100 9/11/07, Stut wrote: tedd wrote: I know that this is not a php question, but all of you are so smart I thought would ask anyway. I need to upload a 5 Meg sql file to a client's database. However, his site's phpMyAdmin shows a maximum file size limit of 2 Meg. N

Re: [PHP] MySQL upload problem

2007-09-11 Thread tedd
At 4:46 PM +0100 9/11/07, Stut wrote: tedd wrote: I know that this is not a php question, but all of you are so smart I thought would ask anyway. I need to upload a 5 Meg sql file to a client's database. However, his site's phpMyAdmin shows a maximum file size limit of 2 Meg. Now, is this s

Re: [PHP] MySQL upload problem

2007-09-11 Thread Stut
tedd wrote: I know that this is not a php question, but all of you are so smart I thought would ask anyway. I need to upload a 5 Meg sql file to a client's database. However, his site's phpMyAdmin shows a maximum file size limit of 2 Meg. Now, is this something that is controlled by his host

[PHP] MySQL upload problem

2007-09-11 Thread tedd
Hi gang: I know that this is not a php question, but all of you are so smart I thought would ask anyway. I need to upload a 5 Meg sql file to a client's database. However, his site's phpMyAdmin shows a maximum file size limit of 2 Meg. Now, is this something that is controlled by his host,

Re: [PHP] MySQL, PHPMyAdmin, GRANT, headaches

2007-09-04 Thread tedd
At 3:00 PM -0400 9/4/07, brian wrote: I'm setting up a site and am having loads of problems with MySQL (which i don't use much, being a Postgres fan). The server is not controlled by myself and I'm waiting on a reply from the admin. In the meantime: PHP 4.3.9 Mysql 4.1.10a (server) 3.23.49 (c

Re: [PHP] MySQL, PHPMyAdmin, GRANT, headaches

2007-09-04 Thread brian
Janet Valade wrote: > > First, if you are having an access denied problem, you will get a PHP > error message. Perhaps you have errors turned off in your PHP script. > Turn them on until you get it working. I forgot to mention that i've temporarily set: ini_set('track_errors', TRUE); // to acces

Re: [PHP] MySQL, PHPMyAdmin, GRANT, headaches

2007-09-04 Thread Janet Valade
brian wrote: I'm setting up a site and am having loads of problems with MySQL (which i don't use much, being a Postgres fan). The server is not controlled by myself and I'm waiting on a reply from the admin. In the meantime: PHP 4.3.9 Mysql 4.1.10a (server) 3.23.49 (client) The database has b

[PHP] MySQL, PHPMyAdmin, GRANT, headaches

2007-09-04 Thread brian
I'm setting up a site and am having loads of problems with MySQL (which i don't use much, being a Postgres fan). The server is not controlled by myself and I'm waiting on a reply from the admin. In the meantime: PHP 4.3.9 Mysql 4.1.10a (server) 3.23.49 (client) The database has been set up alo

Re: [PHP] PHP/MySQL not playing nicely. Server drops connection.

2007-09-03 Thread Michael Williams
On Sep 3, 2007, at 11:12 AM, Michael Williams wrote: Are you sure that Apache is running and accepting connections to / ~michwill? Does a regular HTML page show up ok? Yeah, static pages, and regular php pages load fine. It's only when I bring MySQL into the mix that things go awry. Hav

Re: [PHP] PHP/MySQL not playing nicely. Server drops connection. . .

2007-08-31 Thread brian
Michael Williams wrote: Hi All, I recently installed PHP, APACHE, MYSQL per the method at the following site: http://switch.richard5.net/isp-in-a-box-v2/installing-mysql-on-mac-os-x/ . . .I then attempted to connect to a database (but without executing any commands on it), and I keep rece

[PHP] PHP/MySQL not playing nicely. Server drops connection. . .

2007-08-30 Thread Michael Williams
Hi All, I recently installed PHP, APACHE, MYSQL per the method at the following site: http://switch.richard5.net/isp-in-a-box-v2/installing-mysql-on-mac-os-x/ . . .I then attempted to connect to a database (but without executing any commands on it), and I keep receiving the following err

Re: [PHP] PhP / MySQL problem

2007-08-29 Thread debussy007
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. >>

Re: [PHP] PhP / MySQL problem

2007-08-29 Thread Richard Lynch
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 wha

Re: [PHP] PhP / MySQL problem

2007-08-29 Thread Ludovic André
hange 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

[PHP] PhP / MySQL problem

2007-08-29 Thread debussy007
7;]."','". $_POST['email']."','". $_POST['country']."')"; $result = mysql_query($query, $link) or die($query . " - " . mysql_error()); Thank you for any help ! -- View this message in context: http:

Re: [PHP] MySQL connect used to work PLUS errors not displaying

2007-08-24 Thread Linux NG/Lists
Well, I suppose I should say "Doh!" but even when I get rid of the "@", I still get a blank page - no errors, and no database, either! A followup - I'm taking this over to PHP-DB since it's now database-centric, I think. This still fails: $db = new mysqli( But this works $conn

Re: [PHP] MySQL connect used to work PLUS errors not displaying

2007-08-24 Thread Jim Lucas
Linux NG/Lists wrote: get rid of the @, it will squelch your error output if (mysqli_connect_errno()) {echo 'Error ­ could not connect to database.'; exit; } ?> put something at the end like [DONE] or something so you can see if it is getting past that if statement. -- Jim Lucas "Some

Re: [PHP] MySQL connect used to work PLUS errors not displaying

2007-08-24 Thread Linux NG/Lists
comex wrote: On 8/24/07, Linux NG/Lists <[EMAIL PROTECTED]> wrote: b) Why does the error reporting NOT work as soon as I jam a $db new mysql call into the code? Because you disabled it with an '@'. Well, I suppose I should say "Doh!" but even when I get rid of the "@", I still get a b

Re: [PHP] MySQL connect used to work PLUS errors not displaying

2007-08-24 Thread comex
On 8/24/07, Linux NG/Lists <[EMAIL PROTECTED]> wrote: > b) Why does the error reporting NOT work as soon as I jam a $db new > mysql call into the code? Because you disabled it with an '@'. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] MySQL connect used to work PLUS errors not displaying

2007-08-24 Thread Linux NG/Lists
I swear, it was just working last week! Well, a while ago, on another machine. You get the idea. Here's the deal... PHP 5.1.6 and MySQL 5.x on FC6 fully patched. 1. A simple page with a call to phpinfo() works fine. 2. A barely more complicated page also works fine, in that it throws an expec

[PHP] RE: php/mysql - getting ID of query

2007-08-21 Thread John Pillion
Thanks guys, that's exactly what I was looking for J -Original Message- From: M. Sokolewicz [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 21, 2007 4:51 PM To: John Pillion Cc: php-general@lists.php.net Subject: Re: php/mysql - getting ID of query John Pillion wrote: > This is

[PHP] Re: php/mysql - getting ID of query

2007-08-21 Thread M. Sokolewicz
John Pillion wrote: This is as much a mysql question as it is php. What is the most reliable way to retrieve an auto_increment key/id for a query you just inserted? In other words, I compile all my data, insert it into a new row, and now I want to retrieve the ID it created for it in th

<    1   2   3   4   5   6   7   8   9   10   >