Re: [PHP] mysql with php

2005-05-20 Thread eoghan
$sql = select User_name, User_pass from user where User_name = '$_POST[user_id]' and User_pass = '$_POST[user_pass]'; assuming user_id isnt an int Rittwick Banerjee wrote: Hi friends, I am Rittwick Banerjee and i have made a mysql based user name and password program but I found that what ever

RE: [PHP] mysql with php

2005-05-20 Thread Jim Moseby
-Original Message- From: Rittwick Banerjee [mailto:[EMAIL PROTECTED] Sent: Friday, May 20, 2005 3:59 AM To: php-general@lists.php.net Subject: [PHP] mysql with php Hi friends, I am Rittwick Banerjee and i have made a mysql based user name and password program but I found

RE: [PHP] mysql with php

2005-05-20 Thread George Pitcher
May 2005 11:21 am To: Rittwick Banerjee Cc: php-general@lists.php.net Subject: Re: [PHP] mysql with php $sql = select User_name, User_pass from user where User_name = '$_POST[user_id]' and User_pass = '$_POST[user_pass]'; assuming user_id isnt an int Rittwick Banerjee wrote: Hi

Re: [PHP] mysql with php

2005-05-20 Thread [EMAIL PROTECTED]
try this: $sql = SELECT User_name, User_pass FROM `user` WHERE User_name= '$_POST[user_id]' AND User_pass = '$_POST[user_pass]' ; -afan Rittwick Banerjee wrote: Hi friends, I am Rittwick Banerjee and i have made a mysql based user name and password program but I

Re: [PHP] mysql + addslashes + stripslashes

2005-05-17 Thread Milen Yordanov
AM Subject: Re: [PHP] mysql + addslashes + stripslashes On Mon, May 16, 2005 5:16 am, Pieter Breed said: My problem is that I have a large array (without any funnies like self-referencing) getting serialized. There are some funnies in the string fields though (like `'`s etc). After making

[PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Petzo
is if this is a normal behaviour for PHP+MYSQL or it may vary indifferent conficurations or versions of both php or mysql. It's not a bad thing to be like that but I wonder if my code will behave the same at most systems. Thank you very much -- PHP General Mailing List (http://www.php.net

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Bostjan Skufca @ domenca.com
!) and ofcourse after stripslashes it gets messed-up: ' ' \ \ So my question is if this is a normal behaviour for PHP+MYSQL or it may vary indifferent conficurations

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Petzo
: ' ' \ \ So my question is if this is a normal behaviour for PHP+MYSQL or it may vary indifferent conficurations or versions of both php or mysql. It's not a bad thing to be like that but I wonder if my code will behave the same at most systems

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Pieter Breed
!) and ofcourse after stripslashes it gets messed-up: ' ' \ \ So my question is if this is a normal behaviour for PHP+MYSQL or it may vary indifferent

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Drewcore
I do suspect though, that the problem lies with how I am using addslashes and how I am not using it. Any definitive help would be much appreciated. i'm not an expert at this, but i think that since you're using mysql to store your data, you shouldn't use addslashes() and use

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Richard Lynch
On Mon, May 16, 2005 5:16 am, Pieter Breed said: My problem is that I have a large array (without any funnies like self-referencing) getting serialized. There are some funnies in the string fields though (like `'`s etc). After making a roundtrip to the mysql database, things start to get bad

Re: [PHP] MySql injections (related question)

2005-05-14 Thread Richard Lynch
On Fri, May 13, 2005 12:51 am, Marek Kilimajer said: Richard Lynch wrote: On Thu, May 12, 2005 4:43 pm, Chris Shiflett said: From me: The fact that it uses the character set of your current connection to MySQL means that what your escaping function considers to be a single quote is exactly

Re: [PHP] MySql injections (related question)

2005-05-14 Thread Marek Kilimajer
Richard Lynch wrote: On Fri, May 13, 2005 12:51 am, Marek Kilimajer said: Richard Lynch wrote: On Thu, May 12, 2005 4:43 pm, Chris Shiflett said: From me: The fact that it uses the character set of your current connection to MySQL means that what your escaping function considers to be a single

Re: [PHP] MySql injections (related question)

2005-05-13 Thread Marek Kilimajer
Richard Lynch wrote: On Thu, May 12, 2005 4:43 pm, Chris Shiflett said: From me: The fact that it uses the character set of your current connection to MySQL means that what your escaping function considers to be a single quote is exactly what your database considers to be a single quote. If these

[PHP] MySQL: Collation?

2005-05-13 Thread Sam Smith
I need a new book? What's up with this filtering thing, Collation in phpMyAdmin? It's defaulting to latin1_swdish_ci. What can I just set it to to forget about it till I can read up on it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL: Collation?

2005-05-13 Thread Chris
Sam Smith wrote: I need a new book? What's up with this filtering thing, Collation in phpMyAdmin? It's defaulting to latin1_swdish_ci. What can I just set it to to forget about it till I can read up on it? This is a PHP mailing list, not a phpMyAdmin or MySQL ... (just needed to get that off

Re: [PHP] MySql injections (related question)

2005-05-12 Thread Richard Lynch
, it *WAS* (and *IS*) designed to make data safe for MySQL. Okay, maybe technically it was first written for mSQL, but that being in the state it is, and the current state of affairs of PHP/MySQL... I'd bet a dollar that if the MySQL C Client library changed what needs escaping, addslashes would

Re: [PHP] MySql injections (related question)

2005-05-12 Thread Richard Lynch
On Wed, May 11, 2005 8:27 pm, James Williams said: On 5/11/05, Richard Lynch [EMAIL PROTECTED] wrote: Is mysql_real_escape_string *DIFFERENT* in some incredibly huge secure way that I want to stop working on all my current projects to go re-write the 10,000,000 lines of code? 2 words:

[PHP] Re: [SPAM] Re: [PHP] MySql injections....

2005-05-12 Thread Bostjan Skufca @ domenca.si
can i prevent this. The server is not configured or it's all about the script? - Original Message - From: Bostjan Skufca @ domenca.com [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Wednesday, May 11, 2005 1:50 PM Subject: Re: [PHP] MySql injections

RE: [PHP] MySql injections (related question)

2005-05-12 Thread Kim Madsen
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, May 12, 2005 8:47 AM I'd bet a dollar that if the MySQL C Client library changed what needs escaping, addslashes would change with it. Ehhh? I think not. Let´s let a mindgame (can´t spell hypo..whatever

Re: [PHP] MySql injections (related question)

2005-05-12 Thread James Williams
I'm pretty sure that, in order to use mysql_real_escape_string() you must have magic quotes off or use stripslashes first... the same as addslashes, so it should work if you just search and replace. Don't quote me on that though On 5/12/05, Richard Lynch [EMAIL PROTECTED] wrote: On Wed, May 11,

Re: [PHP] MySql injections (related question)

2005-05-12 Thread Richard Lynch
On Thu, May 12, 2005 12:39 pm, James Williams said: I'm pretty sure that, in order to use mysql_real_escape_string() you must have magic quotes off or use stripslashes first... the same as addslashes, so it should work if you just search and replace. Don't quote me on that though Well, yes,

Re: [PHP] MySql injections (related question)

2005-05-12 Thread James Williams
I couldn't tell you the technicals of it, but just from the php documentation: This function must always (with few exceptions) be used to make data safe before sending a query to MySQL. On 5/12/05, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, May 12, 2005 12:39 pm, James Williams said: I'm

RE: [PHP] MySql injections (related question)

2005-05-12 Thread Richard Lynch
On Thu, May 12, 2005 1:44 am, Kim Madsen said: -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, May 12, 2005 8:47 AM I'd bet a dollar that if the MySQL C Client library changed what needs escaping, addslashes would change with it. Ehhh? I think not.

Re: [PHP] MySql injections (related question)

2005-05-12 Thread Chris Shiflett
Richard Lynch wrote: It's all very well to repeat these pronouncements from on high that mysql_real_escape_string is better but I personally would sure appreciate somebody who's saying this to say *WHY* it is better, and in precisely what ways it is different from addslashes and/or magic quotes

Re: [PHP] MySql injections (related question)

2005-05-12 Thread Richard Lynch
On Thu, May 12, 2005 4:43 pm, Chris Shiflett said: From me: The fact that it uses the character set of your current connection to MySQL means that what your escaping function considers to be a single quote is exactly what your database considers to be a single quote. If these things don't

Re: [PHP] MySql injections (related question)

2005-05-12 Thread Jennifer Goodie
-- Original message -- From: Richard Lynch [EMAIL PROTECTED] On Thu, May 12, 2005 4:43 pm, Chris Shiflett said: From me: The fact that it uses the character set of your current connection to MySQL means that what your escaping function considers to be a

[PHP] MySql injections....

2005-05-11 Thread virtualsoftware
Hi, This is not the proper list to put this question but i hope you can help me. Does anyone know a good tutorial about mysql injections? Thanks a lot for your help

Re: [PHP] MySql injections....

2005-05-11 Thread Bostjan Skufca @ domenca.com
Probably you mean about prevening mysql injections - or not? :) Bostjan On Wednesday 11 May 2005 11:38, [EMAIL PROTECTED] wrote: Hi, This is not the proper list to put this question but i hope you can help me. Does anyone know a good tutorial about mysql injections? Thanks a lot for your

RE: [PHP] MySql injections....

2005-05-11 Thread Mikey
Hi, This is not the proper list to put this question but i hope you can help me. Does anyone know a good tutorial about mysql injections? Thanks a lot for your help http://phpsec.org HTH, Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] MySql injections....

2005-05-11 Thread virtualsoftware
PROTECTED] To: php-general@lists.php.net Sent: Wednesday, May 11, 2005 1:50 PM Subject: Re: [PHP] MySql injections Probably you mean about prevening mysql injections - or not? :) Bostjan On Wednesday 11 May 2005 11:38, [EMAIL PROTECTED] wrote: Hi, This is not the proper list to put this question

Re: [PHP] MySql injections....

2005-05-11 Thread Chris Ramsay
Read Chris' article here: http://shiflett.org/articles/security-corner-apr2004 This should explain everything to you - and yes it's down to the scripts you run. Chris R -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] MySql injections....

2005-05-11 Thread Jay Blanchard
[snip] I have a site and the other days i received a message from a guy that told me my site is vulnerable to mysql injections. I do not know how can i prevent this. The server is not configured or it's all about the script? [/snip] PHP Security - http://www.shiflett.org -- PHP General Mailing

Re: [PHP] MySql injections....

2005-05-11 Thread Ryan A
Hey, I had the same questions a little while back, and from the advise i got on this list I checked out the PEAR:DB class and ADODB...I went with the ADODB solution and have not regretted it since. Check both of them out for your needs. Cheers, Ryan On 5/11/2005 12:50:14 PM, Bostjan Skufca @

Re: [PHP] MySql injections....

2005-05-11 Thread Bostjan Skufca @ domenca.com
this. The server is not configured or it's all about the script? - Original Message - From: Bostjan Skufca @ domenca.com [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Wednesday, May 11, 2005 1:50 PM Subject: Re: [PHP] MySql injections Probably you mean about prevening mysql

Re: [PHP] MySql injections....

2005-05-11 Thread tg-php
@lists.php.net Sent: Wednesday, May 11, 2005 1:50 PM Subject: Re: [PHP] MySql injections Probably you mean about prevening mysql injections - or not? :) Bostjan On Wednesday 11 May 2005 11:38, [EMAIL PROTECTED] wrote: Hi, This is not the proper list to put this question but i hope you can

Re: [PHP] MySql injections (related question)

2005-05-11 Thread -k.
I have a related question, many of you have suggested using addslashes on your variables to prevent SQL injections, but is it safer to use mysql_real_escape_string (or mysql_escape_string)? What is the benefit / cost of using mysql_real_escape_string rather than addslashes? When using Postgres i

Re: [PHP] MySql injections (related question)

2005-05-11 Thread Jason Wong
On Thursday 12 May 2005 06:30, -k. wrote: I have a related question, many of you have suggested using addslashes on your variables to prevent SQL injections, but is it safer to use mysql_real_escape_string (or mysql_escape_string)? What is the benefit / cost of using mysql_real_escape_string

Re: [PHP] MySql injections (related question)

2005-05-11 Thread Richard Lynch
On Wed, May 11, 2005 5:23 pm, Jason Wong said: But now that mysql_real_escape_string() is available that is what you ought to use. But are they REALLY different. Or, put it this way: Suppose I have 10,000,000 lines of code that have Magic Quotes on, which calls addslashes automatically, and I

Re: [PHP] MySql injections....

2005-05-11 Thread Richard Lynch
On Wed, May 11, 2005 5:15 am, [EMAIL PROTECTED] said: I have a site and the other days i received a message from a guy that told me my site is vulnerable to mysql injections. I do not know how can i prevent this. The server is not configured or it's all about the script? It should also be

Re: [PHP] MySql injections (related question)

2005-05-11 Thread James Williams
On 5/11/05, Richard Lynch [EMAIL PROTECTED] wrote: Is mysql_real_escape_string *DIFFERENT* in some incredibly huge secure way that I want to stop working on all my current projects to go re-write the 10,000,000 lines of code? 2 words: Search Replace. -- PHP General Mailing List

Re: [PHP] MySql injections (related question)

2005-05-11 Thread Jason Wong
On Thursday 12 May 2005 09:57, Richard Lynch wrote: On Wed, May 11, 2005 5:23 pm, Jason Wong said: But now that mysql_real_escape_string() is available that is what you ought to use. But are they REALLY different. mysql_real_escape_string() is most certainly different from

[PHP] MySQL PHP issue?

2005-04-27 Thread Dustin Wish
OK, I have check all the mysql doc and php docs on using exists in the query, but it seems I still can not get the query to work. Here it is: SELECT * FROM icisp.account WHERE id in (select oldaccountID from BillMax.account) Or Using sELECT * FROM icisp.account WHERE id exists(select

RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Jay Blanchard
[snip] OK, I have check all the mysql doc and php docs on using exists in the query, but it seems I still can not get the query to work. Here it is: SELECT * FROM icisp.account WHERE id in (select oldaccountID from BillMax.account) Or Using sELECT * FROM icisp.account WHERE id exists(select

Re: [PHP] MySQL PHP issue?

2005-04-27 Thread John Nichel
Dustin Wish wrote: snip Anyone have any idea what I'm doing wrong? /snip Asking on the wrong list. -- John C. Nichel berGeek 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] MySQL PHP issue?

2005-04-27 Thread John Nichel
Jay Blanchard wrote: snip Asking a MySQL question on a PHP list? *slaps knee!* /snip I bet you think you're funny. ;) -- John C. Nichel ÜberGeek 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] MySQL PHP issue?

2005-04-27 Thread Jay Blanchard
[snip] Jay Blanchard wrote: snip Asking a MySQL question on a PHP list? *slaps knee!* /snip I bet you think you're funny. ;) [/snip] I know that you think I am. Yuk-yuk! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Dustin Wish
It is version 3.23.56 -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 2:44 PM To: php-general@lists.php.net Subject: Re: [PHP] MySQL PHP issue? Jay Blanchard wrote: snip Asking a MySQL question on a PHP list? *slaps knee!* /snip I bet

RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Jay Blanchard
[snip] It is version 3.23.56 [/snip] Sub-queries are not supported in that version of MySQL. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] MySQL PHP issue?

2005-04-27 Thread Dustin Wish
SH^*^t Thanks guys. Figured something like that. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 2:53 PM To: Dustin Wish; php-general@lists.php.net Subject: RE: [PHP] MySQL PHP issue? [snip] It is version 3.23.56 [/snip] Sub-queries

Re: [PHP] MySQL PHP issue?

2005-04-27 Thread John Nichel
Dustin Wish wrote: It is version 3.23.56 snip Know thy software. 3.x doesn't support sub-queries. -- John C. Nichel ÜberGeek 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] mysql blob datatype for documents

2005-04-19 Thread Mark Rees
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: 19 April 2005 03:27 To: Bosky, Dave Cc: php-general@lists.php.net Subject: Re: [PHP] mysql blob datatype for documents On Mon, April 18, 2005 5:40 am, Bosky, Dave said: Would it be better to store uploaded pdf, word, or excel

[PHP] mysql blob datatype for documents

2005-04-18 Thread Bosky, Dave
Would it be better to store uploaded pdf, word, or excel documents in a MySql blob field rather than keeping them in a directory? I really want to secure the documents and limit document access to specific users. Curious Dave HTC Disclaimer: The information contained in this message

Re: [PHP] mysql blob datatype for documents

2005-04-18 Thread Richard Lynch
On Mon, April 18, 2005 5:40 am, Bosky, Dave said: Would it be better to store uploaded pdf, word, or excel documents in a MySql blob field rather than keeping them in a directory? I really want to secure the documents and limit document access to specific users. It shouldn't be significantly

Re: [PHP] mysql insert function

2005-04-18 Thread Richard Lynch
On Sun, April 17, 2005 10:56 am, Dasmeet Singh said: I regularly need to insert data into MySQL.. and instead of writing Insert query everytime i wrote this function... and it works well.. Please see and tell is it a good idea using this..or there might be problems with it? It's not a Bad

[PHP] mysql insert function

2005-04-17 Thread Dasmeet Singh
Hi! I regularly need to insert data into MySQL.. and instead of writing Insert query everytime i wrote this function... and it works well.. Please see and tell is it a good idea using this..or there might be problems with it? function db_query($sql) { global $dbh; $result =

Re: [PHP] Mysql insert problems

2005-04-16 Thread Burhan Khalid
Andy Pieters wrote: Hi Whilst you are searching the net, you might also want to search for 'sql injection'. This is no joke! Please use the mysql_escape_string on each variable you get from the user side. Use mysql_real_escape_string() instead. -- PHP General Mailing List (http://www.php.net/)

[PHP] Mysql insert problems

2005-04-15 Thread Frank Miller
All, I have a form which submits technical requests. It worked fine on an old linux box using Mysql 3 series but recently we switched to windows 2003 server SP1 using Mysql 4.1.10. It was doing this before the service pack. I get the form values and then insert them into a table. Sometimes it

Re: [PHP] Mysql insert problems

2005-04-15 Thread John Nichel
Frank Miller wrote: All, I have a form which submits technical requests. It worked fine on an old linux box using Mysql 3 series but recently we switched to windows 2003 server SP1 using Mysql 4.1.10. It was doing this before the service pack. I get the form values and then insert them into a

Re: [PHP] Mysql insert problems

2005-04-15 Thread Andy Pieters
Hi Whilst you are searching the net, you might also want to search for 'sql injection'. This is no joke! Please use the mysql_escape_string on each variable you get from the user side. In your example $Email = mysql_escape_string($_POST['Email']); $Phonenumber =

Re: [PHP] Mysql insert problems

2005-04-15 Thread Philip Hallstrom
On Fri, 15 Apr 2005, Frank Miller wrote: All, I have a form which submits technical requests. It worked fine on an old linux box using Mysql 3 series but recently we switched to windows 2003 server SP1 using Mysql 4.1.10. It was doing this before the service pack. I get the form values and then

Re: [PHP] mysql regexp select questions

2005-04-08 Thread Richard Lynch
On Thu, April 7, 2005 5:32 pm, Andras Kende said: I would like to do the following: mysql db: andrew anthony joe janice john simon sql_query ( select names . I would need only the distinct first character from the query result would

[PHP] mysql regexp select questions

2005-04-07 Thread Andras Kende
I would like to do the following: mysql db: andrew anthony joe janice john simon sql_query ( select names . I would need only the distinct first character from the query result would be: a,j,s I think maybe its REGEXP but never did it before...

[PHP] MySQL empty row

2005-04-04 Thread Neo Theone
Until some time I could make a new empty line in mysql with this query: INSERT INTO `.$_SESSION['type'].`() VALUES () where $_SESSION['type'] was the table I wanted to use but now I get an error and since I use DB I just get this error INSERT INTO `authors`() VALUES () *Warning*: Cannot modify

Re: [PHP] MySQL empty row

2005-04-04 Thread Andy Pieters
Hi Neo Just some observations and hints. I see you use the contents of a user variable ($_POST,$_GET,$_REQUEST, $_SESSION) without check. Possibly you checked them on another page but you shouldn't rely on that. You should take NOTHING for granted. You should escape the input by using a

Re: [PHP] MySQL empty row

2005-04-04 Thread Andy Pieters
On Monday 04 April 2005 18:45, Andy Pieters wrote: After the ? must be NO character, not even a CR or LF Best way to check this is to put your cursor right next to the and press the left key.  If you r cursor moves then press left followed by del.  Keep pressing the del key until all the

Re: [PHP] mysql error

2005-04-02 Thread Burhan Khalid
Mikey wrote: I have not changed any of my hostname/username/password code in the last 6 months and I can still connect to mysql.timerescue.co.uk via the command line interface. Has anyone seen this before - any ideas at all - just started happening today! :o( Strange indeed. I tried to

[PHP] mysql error

2005-04-01 Thread Glen Beamson
Hi, I have suddenly started getting an 'unknown host' error when trying to connect via php (see below). Unknown MySQL Server Host 'mysql.timerescue.co.uk' (0)2005 I have not changed any of my hostname/username/password code in the last 6 months and I can still connect to

Re: [PHP] mysql error

2005-04-01 Thread Angelo Zanetti
it cant find your host mysql.timerescue.co.uk try use an ip address... or try connect via the command line. Glen Beamson wrote: Hi, I have suddenly started getting an 'unknown host' error when trying to connect via php (see below). Unknown MySQL Server Host 'mysql.timerescue.co.uk' (0)2005 I

RE: [PHP] mysql error

2005-04-01 Thread Mikey
I have not changed any of my hostname/username/password code in the last 6 months and I can still connect to mysql.timerescue.co.uk via the command line interface. Has anyone seen this before - any ideas at all - just started happening today! :o( Strange indeed. I tried to connect

FW: [PHP] mysql error

2005-04-01 Thread Mikey
Oooops! My mistake, I had a typo in my config file - it connects just fine either way... -Original Message- From: Mikey [mailto:[EMAIL PROTECTED] Sent: 01 April 2005 13:16 To: 'php-general@lists.php.net' Subject: RE: [PHP] mysql error I have not changed any of my hostname

[PHP] php + mysql: binary arrays

2005-03-29 Thread Robert S
I am writing a contact manager in php/mysql. I'd like to use a binary array as an efficient way to store information for groups that each contact belongs to eg: Field: 'group': 001010 means that the contact belongs to the second and fourth group. If the array is of type Byte, it should be able

RE: [PHP] php + mysql: binary arrays

2005-03-29 Thread YaronKh
[mailto:[EMAIL PROTECTED] On Behalf Of Robert S Sent: Tuesday, March 29, 2005 12:35 PM To: php-general@lists.php.net Subject: [PHP] php + mysql: binary arrays I am writing a contact manager in php/mysql. I'd like to use a binary array as an efficient way to store information for groups that each contact

Re: [PHP] php + mysql: binary arrays

2005-03-29 Thread Colin Ross
is binary-safe, not sure about preg_split() you COULD also use spliti() instead of preg_split() http://us4.php.net/manual/en/function.spliti.php Colin On Tue, 29 Mar 2005 20:35:02 +1000, Robert S [EMAIL PROTECTED] wrote: I am writing a contact manager in php/mysql. I'd like to use a binary

[PHP] Re: php + mysql: binary arrays

2005-03-29 Thread Robert S
Hope I was helpful Yaron Khazai Thanks - will try that out soon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mySQL outputting XML

2005-03-25 Thread Chris Boget
If you use the mysql command line tool, you can pass the -X parameter so that all results will be returned in XML format. Is there an easy way to do that in PHP using the native mysql_*() functions w/o having to manually generate the XML using the result set? Or does anyone know if this is

[PHP] PHP MYSQL table locking

2005-03-24 Thread james tu
I understand table locking with MYSQL. My concern is this. What happens if a php script issues a LOCK, and then somehow crashes without issuing an UNLOCK? All other scripts will not be able to access the LOCKed tables. What is the solution for a situation like this? It will be pretty

Re: [PHP] MySQL, PHP and JBOSS

2005-03-15 Thread Marek Kilimajer
david joffrin wrote: Hi, I finally managed to run JBOSS/Tomcat with PHP, however, I am facing the following error message when my PHP code is accessing MySQL: Fatal error: Call to undefined function mysql_connect() in

[PHP] MySQL, PHP and JBOSS

2005-03-14 Thread david joffrin
Hi, I finally managed to run JBOSS/Tomcat with PHP, however, I am facing the following error message when my PHP code is accessing MySQL: Fatal error: Call to undefined function mysql_connect() in C:\APPS\jboss-3.2.6\server\sudetp\deploy\jbossweb-tomcat50.sar\ROOT.war\registration.php on line

[PHP] newbie php/mysql need help

2005-03-13 Thread p80
I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand I get this from mysql: brand COUNT( brand) brandx4 brandy12 how can I echo this result in php? thanx in advance Pat --

RE: [PHP] newbie php/mysql need help

2005-03-13 Thread Robbert van Andel
Message- From: p80 [mailto:[EMAIL PROTECTED] Sent: Sunday, March 13, 2005 4:35 PM To: php-general@lists.php.net Subject: [PHP] newbie php/mysql need help I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand I get

Re: [PHP] newbie php/mysql need help

2005-03-13 Thread Burhan Khalid
p80 wrote: I do a mysql request like this one: SELECT DISTINCT (brand), COUNT( brand )FROM `machines` where category like 'sold' group by brand Try adding aliases to your query, such as : SELECT DISTINCT (brand), COUNT (brand) AS brand_count FROM `machines` WHERE `category` LIKE 'sold' GROUP BY

[PHP] mysql query update two table in one?

2005-03-10 Thread Tyler Replogle
Can you update two tables in one mysql query i've got these two queries $db-query(update `dbn_members_counters` set views =(views +1) where id = '$this-id' ); $db-query(update `dbn_members` set lastaction = $conf-site_time, page = '$this-page' where id = '$this-id' ); and i was wonder if i

Re: [PHP] mysql query update two table in one?

2005-03-10 Thread Christian Heinrich
Tyler Replogle schrieb: Can you update two tables in one mysql query i've got these two queries $db-query(update `dbn_members_counters` set views =(views +1) where id = '$this-id' ); $db-query(update `dbn_members` set lastaction = $conf-site_time, page = '$this-page' where id = '$this-id' );

Re: [PHP] MySQL - PHP - limits...

2005-03-09 Thread Marek Kilimajer
Alex Ortiz wrote: Hello. Is there a records limit when browsing (a sql SELECT) in PHP from a MySQL table? no limit on php side, perhaps 2^31 if you do calculations. I´m browsing a table with PHP from MySQL, and something is wrong, if the table has more than 5047 records, the browse appears

Re: [PHP] MySQL - PHP - limits...

2005-03-09 Thread Richard Lynch
Is there a records limit when browsing (a sql SELECT) in PHP from a MySQL table? Sort of, I think... When MySQL is compiled, there is a buffer limit on how much crap you can squirt through a single connection. You can maybe alter this in my.cnf or be re-compiling MySQL. If you are trying to

[PHP] MySQL - PHP - limits...

2005-03-08 Thread Alex Ortiz
Hello. Is there a records limit when browsing (a sql SELECT) in PHP from a MySQL table? I´m browsing a table with PHP from MySQL, and something is wrong, if the table has more than 5047 records, the browse appears blank. Additionaly, if make the browse in a child window (target=_blank), the

[PHP] mysql problems

2005-03-01 Thread Jed R. Brubaker
Hi all - I could use a lead on a problem. I just don't know where to start. I have a PHP script that populates a database table. No big deal. It creates mailing labels. However, a weird things keeps happening - every once in a while, a query is run twice. It is the same query, same

Re: [PHP] mysql problems

2005-03-01 Thread Richard Lynch
Jed R. Brubaker wrote: I could use a lead on a problem. I just don't know where to start. I have a PHP script that populates a database table. No big deal. It creates mailing labels. However, a weird things keeps happening - every once in a while, a query is run twice. It is the same query,

Re: [PHP] mysql problems

2005-03-01 Thread Rory McKinley
Jed R. Brubaker wrote: Hi all - I could use a lead on a problem. I just don't know where to start. I have a PHP script that populates a database table. No big deal. It creates mailing labels. However, a weird things keeps happening - every once in a while, a query is run twice. It is the same

Re: [PHP] MySQL and MySQLi compiling

2005-02-19 Thread Chris
Thanks for all the help, I managed to get it working, though I'm not quite sure the reasoning behind it. I used some info I got off of http://bugs.php.net/bug.php?id=29860 to do it. I posted my particular resolution to the bug report. It seems to me that *something* isn't right Chris -- PHP

Re: [PHP] MySQL and MySQLi compiling

2005-02-18 Thread Marek Kilimajer
Chris wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs

Re: [PHP] MySQL and MySQLi compiling

2005-02-18 Thread Richard Lynch
Chris wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part Here's the deal: configure needs to find *BOTH* 'mysql.h' files and

Re: [PHP] MySQL and MySQLi compiling

2005-02-18 Thread Chris
Chris wrote: ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr --with-mysql-include-dir=/usr/include/mysql --with-mysql-lib-dir=/usr/lib/mysql --with-mysqli=/usr/bin/mysql_config it might work. I've managed to stave of the need for the mysql extension for a week or two, but

Re: [PHP] MySQL and MySQLi compiling

2005-02-18 Thread Chris
Richard Lynch wrote: Here's the deal: configure needs to find *BOTH* 'mysql.h' files and 'mysql.so'/'mysql.lib' files *UNDER* the directory you feed it. Figure out where your mysql.h files are. Figure out where your mysql.lib/mysql.so files are. . Thanks for the response, in fact I can't find

[PHP] MySQL and MySQLi compiling

2005-02-17 Thread Chris
Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/include/mysql/

Re: [PHP] MySQL and MySQLi compiling

2005-02-17 Thread dan
Chris wrote: Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs

[PHP] mysql query

2005-02-17 Thread Sebastian
Hello, im working on an article system and looking to avoid running three queries. example, i have this query: SELECT id,title FROM articles WHERE id=$_GET[id] now say $_GET[id] = 5 I would like to get the previous id 4 and the next id 6 (if there is one) so i can do something like: Previous

RE: [PHP] MySQL and MySQLi compiling

2005-02-17 Thread Hans Zaunere
Hi, I've been trying to get these 2 compiled together for a while, and have had no luck. WHere my problem lies, I think, is that I'm not sure what directory should be specified on the --with-mysql part ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/include/mysql/

Re: [PHP] mysql query

2005-02-17 Thread dan
Sebastian wrote: Hello, im working on an article system and looking to avoid running three queries. example, i have this query: SELECT id,title FROM articles WHERE id=$_GET[id] now say $_GET[id] = 5 I would like to get the previous id 4 and the next id 6 (if there is one) so i can do something

<    7   8   9   10   11   12   13   14   15   16   >