RE: [PHP-DB] Showing the next entry

2005-05-17 Thread Juffermans, Jos
Can you send the query and some code that you're using? You probably want to loop like this: while ($row = mysql_fetch_assoc($cursor)) { echo $row{case_note} . br /; } Jos -Original Message- From: John R. Sims, Jr. [mailto:[EMAIL PROTECTED] Sent: 17 May 2005 03:07 To:

RE: [PHP-DB] Select

2005-05-17 Thread Juffermans, Jos
Hi, Instead of doing a SELECT *, specify the fields that you require. Allthough you may think the rows are exactly the same, one might be empty () and one null which is not the same. You are more likely to get the result that you need if you specify the fields: SELECT DISTINCT somedata, rev,

[PHP-DB] Connection Question!

2005-05-17 Thread JeRRy
Hi, Okay lets say I own www.fred.com (which I don't but still) and www.getpaid2reademails.com (so I own two domain, lucky me!) Now I want to connect from getpaid to fred... Okay I have done this and achieved this but is it possible to reject this operation and deny connections outside of

[PHP-DB] Questions with formbuilder: is this the right list?

2005-05-17 Thread ale . pas
Hello, I have some questions about DB_DataObject and FormBuilder PK handling, should I post them here or do you know a better list? TIA -- Alessandro Pasotti ICQ# 245871392 Linux User #167502 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP-DB] addslashes + stripslashes + mysql question

2005-05-17 Thread bastien_k
turn of magic quotes or test for it before using addslashes Bastien From: Petzo [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] addslashes + stripslashes + mysql question Date: Mon, 16 May 2005 11:20:41 +0300 Hi, My question is about the norlmal behaviour of PHP and MYSQL but

Re: [PHP-DB] php line error. .

2005-05-17 Thread martin . norland
'Yemi Obembe wrote: just care to know how php does the line counting when it echoes error messages like: parse error: unexpected '}' on line 129 1. does the line counting includes empty lines yes. 2. are externally included files (using include(), require() etc) also line

RE: [PHP-DB] INSER INTO not working!

2005-05-17 Thread miguel . guirao
Acctually my problem was in that I was using the name of the table in uppercase rather than in lowercase. So MySQL was looking for table REV instead of rev. So for MySQL, REV and rev are very different tables!! Regards, Miguel Guirao -Original Message- From: Constantin Brinzoi

Re: [PHP-DB] addslashes + stripslashes + mysql question

2005-05-17 Thread capi
You have the string ' \ With addslashes it becomes '\ \\ When you insert it into the database it goes into a query like this update table set field=' '\ \\ ' But that inserts into the field only ' \ , in other words the original string. It is a normal behaviour and you should omit the

Re: [PHP-DB] novice on table design

2005-05-17 Thread thisisroot
Addresses should definitely have their own table. Have you considered using Postgres? It allows for table inheritance in much the same way that inheritance works in OOP. You could have a parent table (like a parent class) for People, and child tables (just like child classes) for Employee,

[PHP-DB] addslashes + stripslashes + mysql question

2005-05-17 Thread petzo
Hi, My question is about the norlmal behaviour of PHP and MYSQL but I cant explain it without a simple example. Thank you for reading: I have the following code: ?php print $t = $_POST['txt']; print $t = addslashes($t);

Re: [PHP-DB] problems with a script. .

2005-05-17 Thread martin . norland
John R. Sims, Jr. wrote: Martin; I have taken your advice and read both of the articles, but unfortunately I have not been able to find what needs to be changed. As I mentioned, I am very new at this. Could you possibly look at the script and point me in the right direction? [snip] /head

Re: [PHP-DB] Connection Question!

2005-05-17 Thread Firan Corneliu
If you mean database access that is simple, just create a user that has access only from localhost (and of course remove the others). For mysql just do the query : GRANT ALL PRIVILEGES ON your_database.* to 'user'@'localhost' identified by 'password'. If you mean http access then you can

[PHP-DB]Emisor de respuesta automática: [PHP-DB] Showing the next entry

2005-05-17 Thread miguel . guirao
We need to see your script or at least the portion where you do the query to the database. In general, you need to concatenate your different case-note for a given student as the while cycle goes thru your fetch statement for such a given student. -- MIGUEL GUIRAO

RE: [PHP-DB] Connection Question!

2005-05-17 Thread Juffermans, Jos
What are you trying to connect to? Do you have a webservice on the second domain? Is it a database - and if so, which? -Original Message- From: JeRRy [mailto:[EMAIL PROTECTED] Sent: 17 May 2005 08:33 To: php-db@lists.php.net Subject: [PHP-DB] Connection Question! Hi, Okay lets say I

[PHP-DB] Re: Select

2005-05-17 Thread David Robley
Miguel Antonio Guirao Aguilar wrote: Hi!! I have this query in PHP: $items2 = mysql_query(SELECT DISTINCT * FROM rev ORDER BY rev, $link); I have three rows with the same data on it, and DISTINCT seems to be not working, since I got all the rows, any ideas of what is going wrong?

RE: [PHP-DB] Select

2005-05-17 Thread Bastien Koert
distinc needs a field select distinct(name) from table bastien From: MIGUEL ANTONIO GUIRAO AGUILAR [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Select Date: Mon, 16 May 2005 19:26:20 -0700 Hi!! I have this query in PHP: $items2 = mysql_query(SELECT DISTINCT * FROM rev ORDER BY rev,

[PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
I would like to get the itemID number (autoincrement) of the last insert. (Insert order, get last orderID number and use it elsewhere.) I'm having trouble understanding how to do a transaction in mysql/php Code below: $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error

[PHP-DB] Re: sql injection attack, protection from

2005-05-17 Thread Matthew Weier O'Phinney
* Mayo [EMAIL PROTECTED]: I'm new to PHP and would like to make certain that I have the basic protection for the site: Use double quotes to contain variable This depends entirely on the variable type expected by MySQL; int and floats don't necessarily need quotes. However, it's typically a

RE: [PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
Thanks, the $orderId = mysql_insert_id($result) was what I was looking for. But in the long run, I'm still concerned about how to group several queries into one transaction. As for example when one wants to make multiple inserts with one submit. Ex: User wants to input inventory. He's going to

RE: [PHP-DB] multiple queries, one transaction

2005-05-17 Thread mayo
Well, for something like this you would need one row for each item. I just did a db for a clothing store (with cold fusion) itemID: 1001 // autoincrement itemTypeID: 1 // number -- refers to jeans itemDesignerID: 5 // number -- refers to designer Antik itemSize: 32 // number -- refers to waist

RE: [PHP-DB] multiple queries, one transaction

2005-05-17 Thread Miguel Guirao
There is a function that gets the last auto increment value for an ID field!! -Original Message- From: mayo [mailto:[EMAIL PROTECTED] Sent: Martes, 17 de Mayo de 2005 10:27 a.m. To: php-db@lists.php.net Subject: [PHP-DB] multiple queries, one transaction I would like to get the itemID