From: "Rhino" <[EMAIL PROTECTED]>
Most of the time, when I see a column named 'id', it is defined as an
integer. If _your_ 'id' column is defined as an integer, then the reason
your WHERE clause is failing is very simple: Your WHERE clause is looking
for all the rows where the 'id' value is a character-string containing
'5', not the integer value 5. In other words, remove the apostrophes on
either side of the 5 in the WHERE clause so that it says:
WHERE id = 5
_not_
WHERE id = '5'
I tried this, but didn't work yet. I tried double, simple and no quotes,
same problem: WHERE only works when executed directly in the mysql client,
no from mysql api of the php.
See the table creation:
CREATE TABLE `clientes` (
`id` int(5) NOT NULL auto_increment,
`tipo` char(1) default NULL,
`razao_social` varchar(30) default NULL,
and your WHERE clause will probably start working just fine.
If your 'id' column is defined as a CHAR, VARCHAR or similar data type,
then the apostrophes around the 5 are fine and there is some other
problem.
The php and db structure and data are attacheds.
I don't see them in my copy of the email....
Also, you can see the codes in...
http://www.spalha.com.br/spalha/DB_code.html
http://www.spalha.com.br/spalha/insert_client_code.html
(thanks to GESHI project, http://qbnz.com/highlighter/index.php =)
Two infos: 1) Im not a
expert 2) The code is in the beggining of the development, so are too
many
uglyness yet =)
Also, just a small note about English grammar since English doesn't appear
to be your first language: contractions like 'didnt' and 'dont' should
_always_ be spelled with apostrophes. In other words: use don't, not dont;
use didn't, not didnt.
Unfortunately, even some people who know only English are starting to
spell contractions without the apostrophes but this is always wrong and
makes the writer look illiterate. Obviously, we make allowances for those
who are relatively new to English but I wanted you to know the right way
to handle contractions. I assume you want to write English as well as you
can so please don't copy the bad habits of English-speakers who don't have
enough education or self-respect to spell their own language correctly.
So I will have begin to pay the list =) Beyond mysql I learn English
too?
Well, thank you by the hint, I'll stay alive about this.
Thank you
Tom
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]