2009/5/21 Leidago !Noabeb leid...@googlemail.com
Hi All
I know this is not strictly a PHP question, but i have a problem whenever i
insert a record using PHP. Basically the auto increment field does not work
at all. Here's the structure of the table that i'm using:
CREATE TABLE `children`
Leidago !Noabeb wrote:
Hi All
I know this is not strictly a PHP question, but i have a problem
whenever i insert a record using PHP. Basically the auto increment
field does not work at all. Here's the structure of the table that i'm
using:
CREATE TABLE `children` (
`cid` int(4) NOT
Bogdan Stancescu wrote:
On 24-Apr-09 03:45, Chris wrote:
I don't think mysql has any way of finding that out. If you're using an
abstraction layer, it's easy enough in code - though rollback's are a
little harder - should they do a complete rollback or just to a savepoint?
Thank you for
Bogdan Stancescu wrote:
Hello list,
I'm developing a library and would need to know if the code calling my
library has already started a MySQL transaction or not. I want to know
whether I should start one or use savepoints instead -- starting a
transaction if one is already in progress commits
Jan G.B. wrote:
2009/4/21 Per Jessen p...@computer.org:
Jan G.B. wrote:
A web application that uses an external db server would be quite ...
uhm... slow! Anyone did this, yet? ;)
Certainly, and it's not slow. It depends entirely on your connection
to the public internet.
As we're
On 24-Apr-09 03:45, Chris wrote:
I don't think mysql has any way of finding that out. If you're using an
abstraction layer, it's easy enough in code - though rollback's are a
little harder - should they do a complete rollback or just to a savepoint?
Thank you for taking the time to sketch that
On Wed, Apr 22, 2009 at 10:25 AM, Jan G.B. ro0ot.w...@googlemail.com wrote:
2009/4/21 Per Jessen p...@computer.org:
Jan G.B. wrote:
A web application that uses an external db server would be quite ...
uhm... slow! Anyone did this, yet? ;)
Certainly, and it's not slow. It depends entirely
Hello list,
I'm developing a library and would need to know if the code calling my
library has already started a MySQL transaction or not. I want to know
whether I should start one or use savepoints instead -- starting a
transaction if one is already in progress commits the existing
transaction,
Bogdan Stancescu wrote:
Hello list,
I'm developing a library and would need to know if the code calling my
library has already started a MySQL transaction or not. I want to know
whether I should start one or use savepoints instead -- starting a
transaction if one is already in progress commits
2009/4/21 Per Jessen p...@computer.org:
Jan G.B. wrote:
A web application that uses an external db server would be quite ...
uhm... slow! Anyone did this, yet? ;)
Certainly, and it's not slow. It depends entirely on your connection to
the public internet.
As we're speaking of the
provided I want to store hash of a password in MySQL ... Using MySQL,
the whole check can be achieved with a SQL query, since the MD5
function is provided as part of the database query language ...
Can I use also SHA1 or must I use MD5?
Thanks in advance,
--
When the sun rises I receive and
Grega Leskovsek wrote:
provided I want to store hash of a password in MySQL ... Using MySQL,
the whole check can be achieved with a SQL query, since the MD5
function is provided as part of the database query language ...
Can I use also SHA1 or must I use MD5?
You could have just checked
On Tue, Apr 21, 2009 at 8:34 AM, Grega Leskovsek mavri...@gmail.com wrote:
provided I want to store hash of a password in MySQL ... Using MySQL,
the whole check can be achieved with a SQL query, since the MD5
function is provided as part of the database query language ...
Can I use also SHA1
2009/4/21 Andrew Ballard aball...@gmail.com:
On Tue, Apr 21, 2009 at 8:34 AM, Grega Leskovsek mavri...@gmail.com wrote:
provided I want to store hash of a password in MySQL ... Using MySQL,
the whole check can be achieved with a SQL query, since the MD5
function is provided as part of the
Jan G.B. wrote:
A web application that uses an external db server would be quite ...
uhm... slow! Anyone did this, yet? ;)
Certainly, and it's not slow. It depends entirely on your connection to
the public internet.
--
Per Jessen, Zürich (18.2°C)
--
PHP General Mailing List
Andrew Ballard wrote:
On Tue, Apr 21, 2009 at 8:34 AM, Grega Leskovsek mavri...@gmail.com wrote:
provided I want to store hash of a password in MySQL ... Using MySQL,
the whole check can be achieved with a SQL query, since the MD5
function is provided as part of the database query language ...
Oops, meant to copy the list.
-- Forwarded message --
From: Steve Holmes sholme...@mac.com
Date: Tue, Apr 21, 2009 at 10:13 PM
Subject: Re: [PHP] MySQL, MD5 and SHA1
To: Per Jessen p...@computer.org
On Tue, Apr 21, 2009 at 1:35 PM, Per Jessen p...@computer.org wrote:
Jan G.B
We are looking at a project where we will potentially need to store
sensetive information in a few fields of a MySQL table. Any recommendations
on where to look for best practices in doing this? for encrypting the data,
etc.? We will need to be able to decrypt the data as well, although this can
At 10:00 AM -0400 4/17/09, Russell Jones wrote:
We are looking at a project where we will potentially need to store
sensetive information in a few fields of a MySQL table. Any recommendations
on where to look for best practices in doing this? for encrypting the data,
etc.? We will need to be
If its by a user-basis, something that can be a bit risky but possible - You
can encrypt it, password is hashed on database, and the key to the other
data is the un-encrypted password..
On Fri, Apr 17, 2009 at 5:00 PM, Russell Jones rjon...@gmail.com wrote:
We are looking at a project where we
MySQLs own Function AES_(EN|DE)CRYPT is pretty cool for this case.
--
Stefan Langwald
2009/4/17 דניאל דנון danondan...@gmail.com:
If its by a user-basis, something that can be a bit risky but possible - You
can encrypt it, password is hashed on database, and the key to the other
data is the
On Fri, Apr 17, 2009 at 10:15 AM, דניאל דנון danondan...@gmail.com wrote:
If its by a user-basis, something that can be a bit risky but possible -
You
can encrypt it, password is hashed on database, and the key to the other
data is the un-encrypted password..
On Fri, Apr 17, 2009 at 5:00
On Apr 17, 2009, at 10:17 AM, Stefan Langwald wrote:
MySQLs own Function AES_(EN|DE)CRYPT is pretty cool for this case.
--
Stefan Langwald
We use MySQL's AES_(EN|DE)CRYPT. It's fast, easy to use and uses 128
bit encryption (optionally 256).
Hi guys,
Please can anyone tell me what I'm doing wrong with the code below? It keep
returning unsuccessful.
$result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY
AUTO_INCREMENT,
table1_id INT NOT NULL,
name VARCHAR(100) NOT NULL,
@lists.php.net
Sent: Tuesday, April 07, 2009 3:05 PM
Subject: [PHP] PHP-MYSQL Question
Hi guys,
Please can anyone tell me what I'm doing wrong with the code below? It keep
returning unsuccessful.
$result=mysql_query(CREATE TABLE table2(table2_id INT NOT NULL PRIMARY KEY
AUTO_INCREMENT
abdulazeez alugo wrote:
Hi guys,
Please can anyone tell me what I'm doing wrong with the code below? It
keep returning unsuccessful.
Why don't you print out mysql_error() ? It'll tell you right away.
/Per
--
Per Jessen, Zürich (20.1°C)
--
PHP General Mailing List
From: p...@computer.org
Date: Tue, 7 Apr 2009 15:18:35 +0200
To: php-general@lists.php.net
Subject: Re: [PHP] PHP-MYSQL Question
abdulazeez alugo wrote:
Hi guys,
Please can anyone tell me what I'm doing wrong with the code below? It
keep returning unsuccessful.
Why
Can anyone here recommend an ISP that will let me have a dedicated
server (not shared), and also allow me to adjust the ft_min_word_len
mySQL parameter? I was originally thinking Dreamhost PS, but I
recently found out that they do not allow changes to mySQL
environmental variables. I really
Rob Gould wrote:
Can anyone here recommend an ISP that will let me have a dedicated
server (not shared), and also allow me to adjust the ft_min_word_len
mySQL parameter? I was originally thinking Dreamhost PS, but I
recently found out that they do not allow changes to mySQL
environmental
Hi,
Can anyone here recommend an ISP that will let me have a dedicated
server (not shared), and also allow me to adjust the ft_min_word_len
mySQL parameter? I was originally thinking Dreamhost PS, but I
recently found out that they do not allow changes to mySQL
environmental variables. I
Hello :)
I have some troubles with php and mysql. I have a normal MySQL Query
and this returns X 3 rows.
Now i want to get the last 3 inserted values. For Example i've inserted
A, B, C, D, E
I want to get the last inserted values, e.g. E D C (in reversed order)
So how to do this? I
Sebastian Muszytowski wrote:
Hello :)
I have some troubles with php and mysql. I have a normal MySQL Query
and this returns X 3 rows.
Now i want to get the last 3 inserted values. For Example i've inserted
A, B, C, D, E
I want to get the last inserted values, e.g. E D C (in reversed
I have some troubles with php and mysql. I have a normal MySQL Query
and this returns X 3 rows.
Now i want to get the last 3 inserted values. For Example i've inserted
A, B, C, D, E
I want to get the last inserted values, e.g. E D C (in reversed order)
So how to do this? I already searched
Thijs Lensselink schrieb:
Sebastian Muszytowski wrote:
Hello :)
I have some troubles with php and mysql. I have a normal MySQL Query
and this returns X 3 rows.
Now i want to get the last 3 inserted values. For Example i've inserted
A, B, C, D, E
I want to get the last inserted values,
On Mon, Mar 30, 2009 at 7:55 AM, Sebastian Muszytowski
s.muszytow...@googlemail.com wrote:
Thijs Lensselink schrieb:
Sebastian Muszytowski wrote:
Hello :)
I have some troubles with php and mysql. I have a normal MySQL Query
and this returns X 3 rows.
Now i want to get the last 3
could use others? i think why should i use and add
another system? I work with mysql already and when php+mysql have the
function i need it's better and i don't waste ressources :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Date: Mon, 30 Mar 2009 14:55:08 +0200
From: s.muszytow...@googlemail.com
To: p...@addmissions.nl
CC: php-general@lists.php.net
Subject: Re: [PHP] PHP + MySQL - Load last inserts
Thijs Lensselink schrieb:
Sebastian Muszytowski wrote:
Hello :)
I have some troubles with php
users.
The second thing that aware me from doing this is, why use/build ressources
when you could use others? i think why should i use and add another system?
I work with mysql already and when php+mysql have the function i need it's
better and i don't waste ressources :)
Insert 100 records
too much users.
The second thing that aware me from doing this is, why use/build ressources
when you could use others? i think why should i use and add another system?
I work with mysql already and when php+mysql have the function i need it's
better and i don't waste ressources :)
Insert 100
, i could use code to remember but i think
it
would be very slow when i have too much users.
The second thing that aware me from doing this is, why use/build
ressources
when you could use others? i think why should i use and add another
system?
I work with mysql already and when php+mysql have
The physical order of the rows changed (as you can see) but it does not
re-use the id's that were deleted.
Ordering by the id will get you the last bunch inserted.
If you're using innodb you'll have to be aware it's transaction specific, if
you're using myisam it will be system wide.
I'll
:38:01 -0400
To: defati...@hotmail.com; php-general@lists.php.net
From: tedd.sperl...@gmail.com
Subject: Re: [PHP] MYSQL TABLES (One To Many Relationship)
At 5:04 PM +0100 3/22/09, abdulazeez alugo wrote:
Hi guys,
I need help on something I'm working on and its really eating me up
so I'll
Hi guys,
I need help on something I'm working on and its really eating me up so I'll
appreciate any help I can get on it.
I'm writing code for a site that posts a topic for discussion and accepts
comments (Just like a parliament).
There are different discussions for every day and the
At 5:04 PM +0100 3/22/09, abdulazeez alugo wrote:
Hi guys,
I need help on something I'm working on and its really eating me up
so I'll appreciate any help I can get on it.
I'm writing code for a site that posts a topic for discussion and
accepts comments (Just like a parliament).
There
From: Dirk
Thilo Klein wrote:
Dear readers,
I am new to relational DB but not to MySQL PHP in general. I
created a RDB using Struggling with the program's
complexity I managed to create a set of databases being
interconnected
via (foreign) keys.
What I want to know is how to
Bob McConnell wrote:
From: Dirk
Thilo Klein wrote:
Dear readers,
I am new to relational DB but not to MySQL PHP in general. I
created a RDB using Struggling with the program's
complexity I managed to create a set of databases being
interconnected
via (foreign) keys.
What I want
Dear readers,
I am new to relational DB but not to MySQL PHP in general. I
created a RDB using Powerdesigner. Struggling with the program's
complexity I managed to create a set of databases being interconnected
via (foreign) keys.
What I want to know is how to use this database via
Thilo Klein wrote:
Dear readers,
I am new to relational DB but not to MySQL PHP in general. I
created a RDB using Struggling with the program's
complexity I managed to create a set of databases being interconnected
via (foreign) keys.
What I want to know is how to use this database
), you have several choices. You can
use the native PHP mysql functions to access the tables. Or you can use
PHP's PDO classes (or similar). Both are documented at php.net (and very
well, I might add).
Your ER diagram is a visual representation of various CREATE TABLE
statements in SQL. Using
Thilo Klein wrote:
Dear readers,
I am new to relational DB but not to MySQL PHP in general. I
created a RDB using Powerdesigner. Struggling with the program's
complexity I managed to create a set of databases being interconnected
via (foreign) keys.
What I want to know is how to use
Chris wrote:
That won't tell you where a query comes from ;) Add a debug_backtrace
into the class to also pinpoint where the query was called from.
Complicated queries built on variables (or even just long queries
built over multiple lines) will be hard to find just by looking at the
mysql
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make
it compatible with other databases. I'm curious what you all think.
Thanks,
Jay
Class:
--
?php
// Standard MySQL class
class do_mysql
{
2009/1/21 Jay Moore jaymo...@accu-com.com
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make it
compatible with other databases. I'm curious what you all think.
Thanks,
Jay
Hey,
1. You know the
On Wed, Jan 21, 2009 at 9:45 AM, Edmund Hertle
edmund.her...@student.kit.edu wrote:
2009/1/21 Jay Moore jaymo...@accu-com.com
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make it
compatible with other
On Wed, Jan 21, 2009 at 12:45 PM, Edmund Hertle
edmund.her...@student.kit.edu wrote:
2009/1/21 Jay Moore jaymo...@accu-com.com
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make it
compatible with
On Wed, Jan 21, 2009 at 11:37:07AM -0600, Jay Moore wrote:
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make
it compatible with other databases. I'm curious what you all think.
Thanks,
Jay
Class:
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make it
compatible with other databases. I'm curious what you all think.
I have a similar thing I use, which uses the same (or at least very
similar) API
Paul M Foster schreef:
On Wed, Jan 21, 2009 at 11:37:07AM -0600, Jay Moore wrote:
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make
it compatible with other databases. I'm curious what you all
On January 21, 2009 12:37:07 Jay Moore wrote:
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make
it compatible with other databases. I'm curious what you all think.
I definetly think that using a DB
Good ideas guys. The input is much appreciated.
Jochem (and anyone else, I guess), as I am not 100% versed with
Exceptions, the php5 version you suggested, are those Exceptions able to
be handled outside the class?
Do I need my try block to be within the class block, or can I have the
try
On Wed, Jan 21, 2009 at 09:10:54PM +0100, Jochem Maas wrote:
Paul M Foster schreef:
On Wed, Jan 21, 2009 at 11:37:07AM -0600, Jay Moore wrote:
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make
On Wed, Jan 21, 2009 at 02:30:00PM -0600, Jay Moore wrote:
Good ideas guys. The input is much appreciated.
Jochem (and anyone else, I guess), as I am not 100% versed with
Exceptions, the php5 version you suggested, are those Exceptions able to
be handled outside the class?
Do I need my
Jay Moore schreef:
Good ideas guys. The input is much appreciated.
Jochem (and anyone else, I guess), as I am not 100% versed with
Exceptions, the php5 version you suggested, are those Exceptions able to
be handled outside the class?
Do I need my try block to be within the class block,
I know it's very OO-y to use exceptions, but I hate them. They're like
setjmp/longjmp calls in C, and they're a really headache to deal with.
If you don't use default or predone handlers, you have to put all kinds
of try/catch blocks around everything. They make for non-linear
execution, and I
Jay Moore schreef:
I know it's very OO-y to use exceptions, but I hate them. They're like
setjmp/longjmp calls in C, and they're a really headache to deal with.
If you don't use default or predone handlers, you have to put all kinds
of try/catch blocks around everything. They make for
2009/1/21 Jay Moore jaymo...@accu-com.com
I know it's very OO-y to use exceptions, but I hate them. They're like
setjmp/longjmp calls in C, and they're a really headache to deal with.
If you don't use default or predone handlers, you have to put all kinds
of try/catch blocks around
there is an art to using them, they compliment 'traditional' error
handling, and I agree they can hinder if used badly.
I don't think I've ever seen Exceptions used well...
Invariably, I end up having to write a wrapper function around every function
implemented and catch all the
c...@l-i-e.com wrote:
there is an art to using them, they compliment 'traditional' error
handling, and I agree they can hinder if used badly.
I don't think I've ever seen Exceptions used well...
Invariably, I end up having to write a wrapper function around every function
implemented and
On Wed, Jan 21, 2009 at 10:00:53PM +0100, Jochem Maas wrote:
Jay Moore schreef:
I know it's very OO-y to use exceptions, but I hate them. They're like
setjmp/longjmp calls in C, and they're a really headache to deal with.
If you don't use default or predone handlers, you have to put all
Nathan Rixham schreef:
c...@l-i-e.com wrote:
there is an art to using them, they compliment 'traditional' error
handling, and I agree they can hinder if used badly.
I don't think I've ever seen Exceptions used well...
Invariably, I end up having to write a wrapper function around every
Eric Butera wrote:
On Wed, Jan 21, 2009 at 12:45 PM, Edmund Hertle
edmund.her...@student.kit.edu wrote:
2009/1/21 Jay Moore jaymo...@accu-com.com
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I can improve it. This is for MySQL only. I don't need to make it
I prefer to deal with the issues locally, or have a documented behaviour with
return values and error details available, much like most of PHP
extensions/internals.
try/catch ends up with weird code organization, imho, especially when you can
only really handle some exceptions.
For real
On Wed, Jan 21, 2009 at 5:53 PM, Chris dmag...@gmail.com wrote:
Eric Butera wrote:
On Wed, Jan 21, 2009 at 12:45 PM, Edmund Hertle
edmund.her...@student.kit.edu wrote:
2009/1/21 Jay Moore jaymo...@accu-com.com
This is a MySQL class I use and I wanted to get everyone's thoughts on
how/if I
Yea if you're only targeting 1 db, then why not use that class? At
least then there's the php manual to figure out what something does.
Because then to add query logging for the whole app, you just need to put it
in the class :)
(I've done that before to check what's being run and where
On Wed, Jan 21, 2009 at 6:09 PM, Chris dmag...@gmail.com wrote:
Yea if you're only targeting 1 db, then why not use that class? At
least then there's the php manual to figure out what something does.
Because then to add query logging for the whole app, you just need to put
it
in the class
Chris schreef:
Yea if you're only targeting 1 db, then why not use that class? At
least then there's the php manual to figure out what something does.
Because then to add query logging for the whole app, you just need to
put it
in the class :)
(I've done that before to check what's being
On Wed, Jan 21, 2009 at 6:37 PM, Jochem Maas joc...@iamjochem.com wrote:
Chris schreef:
Yea if you're only targeting 1 db, then why not use that class? At
least then there's the php manual to figure out what something does.
Because then to add query logging for the whole app, you just need
On Wed, 2009-01-21 at 18:52 -0500, Eric Butera wrote:
On Wed, Jan 21, 2009 at 6:37 PM, Jochem Maas joc...@iamjochem.com wrote:
Chris schreef:
Yea if you're only targeting 1 db, then why not use that class? At
least then there's the php manual to figure out what something does.
Because
On Wed, Jan 21, 2009 at 7:07 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
On Wed, 2009-01-21 at 18:52 -0500, Eric Butera wrote:
On Wed, Jan 21, 2009 at 6:37 PM, Jochem Maas joc...@iamjochem.com wrote:
Chris schreef:
Yea if you're only targeting 1 db, then why not use that class?
After following some instructions on compiling PHP 5.2.8 from source ( http://osx.topicdesk.com/content/view/48/62/
), I notice now that phpinfo() reports that I am running the MySQL
client API version 4.1.22 (instead of 5.0.45). Is this something to
do with how you compile PHP, or does it
PHP had a built-in MySQL for awhile as I recall.
You had to explicitly use --with-mysql=/usr/local (or wherever you put your
mysql headers/libs) to make it choose the one you wanted.
Even if it's not using built-in, it may have found an old install of your
MySQL rather than your shiny new
Thing is, I have MySQL 5.0.67 installed, and I've never had MySQL 4 on
this box (Xserve G5, Mac OS X Server 10.4.11). Here's my configure
command:
./configure --prefix=/usr/local/php5 --mandir=/usr/share/man --
infodir=/usr/share/info --with-apxs --with-ldap=/usr --with-kerberos=/
usr
Historically, mysql has been both an external extension, and a built-in part of
the source, depending on the version of PHP.
Your current experience would indicate that it's only external in 5.2.8, but I
cannot confirm nor deny that.
How is MySQL installed?
If it's rpm, do you have
Hi all
Do you know any websites for mysql question?
I do submit the mysql forum but I would like to have more to learn
Now I have mysql replication question.
Thank you
__
Ask a question on any topic and get answers from
The mysql forum is the best place. Note that their holiday schedule
may mean some lag in getting answers.
Bastien
Sent from my iPod
On Dec 29, 2008, at 7:51 AM, ann kok oiyan...@yahoo.ca wrote:
Hi all
Do you know any websites for mysql question?
I do submit the mysql forum but I would
Okay maybe i have just forgot.
I am trying to update the database and do a +1 to a int field without pulling
the data and adding 1 to it and sticking it back in.
Someone refresh me on this please.
I think it is something like.
$dwsl = mysql_query(UPDATE database set Field='+1' WHERE
Hello, you have to do :
$dwsl = mysql_query('UPDATE database SET Field=Field+1 WHERE
Criteria=\'Criteria\''); From: ad...@buskirkgraphics.com To:
php-general@lists.php.net Date: Mon, 29 Dec 2008 12:05:37 -0500 Subject:
[PHP] Php mysql update Okay maybe i have just forgot. I am trying
Wouldn't it be:
mysql_query(UPDATE database set Field = Field+1 WHERE
Criteria='Criteria');
Note: no '' around +1, = operator
John Corry
ad...@buskirkgraphics.com wrote:
Okay maybe i have just forgot.
I am trying to update the database and do a +1 to a int field without pulling
the data and
-0500 Subject:
[PHP] Php mysql update Okay maybe i have just forgot. I am trying to update
the database and do a +1 to a int field without pulling the data and adding 1
to it and sticking it back in. Someone refresh me on this please. I think
it is something like. $dwsl = mysql_query(UPDATE
Jim Lucas wrote:
[EMAIL PROTECTED] wrote:
Ok, so just that I am clear, you are SELECTing and pulling all the data
that you are submitting in the above INSERT statement from the DB
initially,
then you are only modifying the confirm_number value and then re-
submitting all the values, as they
Chris wrote:
Jim Lucas wrote:
[EMAIL PROTECTED] wrote:
Ok, so just that I am clear, you are SELECTing and pulling all the
data that you are submitting in the above INSERT statement from the
DB initially,
then you are only modifying the confirm_number value and then re-
submitting all the
Michael S. Dunsavage wrote:
On Fri, 2008-11-14 at 12:46 -0800, Jim Lucas wrote:
SELECT @confirm_number AS confirm_number;
Are we not SELECTING the column value here? should we be selecting
confirm_number as confirm_number?
The idea is to give you the number that was used in the INSERT
On Fri, 2008-11-14 at 08:46 +0100, Jochem Maas wrote:
1000 + 1 != 10001
you might consider setting a default of 1000 or 1 or whatever on
the given
field so it's automatically populated with that number when a contact
record is
created.
Sorry. Hit the 0 one to few times.
--
Michael S.
okay I want to pull an integer from a database called confirm_number,
add 1 and repost it back to the database
here's the code I'm using.
$queryconfirm=SELECT confirm_number from contacts ORDER BY contact DESC
LIMIT 1;
I assume that you are already aware that if you set the variable
I would create a separate table for this (confirmation_numbers or something)
with an autoincrement primary key. That way you can simply insert a new
record for you contact and then ask (using mysql_insert_id()) what the
confirmation number is.
This approach is much safer as you can be 100% sure
okay I want to pull an integer from a database called confirm_number,
add 1 and repost it back to the database
No, you don't want to do that.
:-)
You are introducing a race condition between TWO users who hit the same page at
the same time.
They each get, say, 42, and they each put
On Fri, Nov 14, 2008 at 9:58 AM, [EMAIL PROTECTED] wrote:
okay I want to pull an integer from a database called confirm_number,
add 1 and repost it back to the database
No, you don't want to do that.
:-)
You are introducing a race condition between TWO users who hit the same
page at
update contacts set confirm_number = confirm_number + 1 order by
contact
desc limit 1
Here is the php query I've been using to send the record in the first
place
$query=INSERT INTO contacts (first_name, last_name, email, phn_number,
address, city, state, zip, dates, comments, confirm_number)
[EMAIL PROTECTED] wrote:
update contacts set confirm_number = confirm_number + 1 order by
contact
desc limit 1
Here is the php query I've been using to send the record in the first
place
$query=INSERT INTO contacts (first_name, last_name, email, phn_number,
address, city, state, zip,
On Fri, Nov 14, 2008 at 1:22 PM, [EMAIL PROTECTED] wrote:
update contacts set confirm_number = confirm_number + 1 order by
contact
desc limit 1
Here is the php query I've been using to send the record in the first
place
$query=INSERT INTO contacts (first_name, last_name, email,
301 - 400 of 3625 matches
Mail list logo