ad...@buskirkgraphics.com wrote:
> Before most of you go on a rampage of how to please read below...
>
> As most of you already know when using MySQL from the shell you can write
> your queries in html format in an out file.
>
> Example: shell>mysql -uyourmom -plovesme --html
> This now will r
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 valu
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 or
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
sta
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?
--
Michael S. Dunsavage
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
Jim Lucas wrote:
> Michael S. Dunsavage wrote:
>> On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote:
'{$Comments}',
@confirm_number
)
>>> The above should be this instead
>>>
>>> @confirm_number
>>> );
>> Even after f
Michael S. Dunsavage wrote:
> On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote:
>>> '{$Comments}',
>>> @confirm_number
>>> )
>> The above should be this instead
>>
>> @confirm_number
>> );
>
> Even after fixing that, nothing gets
On Fri, 2008-11-14 at 13:31 -0800, Jim Lucas wrote:
> > '{$Comments}',
> > @confirm_number
> > )
>
> The above should be this instead
>
> @confirm_number
> );
Even after fixing that, nothing gets inserted into the database. I've
b
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
[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 origina
>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 originally were,
Well, actually when all
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_na
[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, s
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)
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
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 th
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
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.
--
Mich
Michael S. Dunsavage schreef:
> 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";
> $confirmresult=$querycon
On Fri, 2008-11-14 at 00:52 -0600, Micah Gersten wrote:
> If you're just adding one, there is no reason to retrieve the data,
> process it, and update it. You can just update the number.
> http://dev.mysql.com/doc/refman/5.0/en/update.html
But, the problem is that the confirm_number is a confirma
If you're just adding one, there is no reason to retrieve the data,
process it, and update it. You can just update the number.
http://dev.mysql.com/doc/refman/5.0/en/update.html
Also, you should read the MySQL manual on default values:
http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.h
John Nichel wrote:
Raditha Dissanayake wrote:
Reinhart Viane wrote:
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manual site or a good mysql book?
That does not mean mysql q
Raditha Dissanayake wrote:
Reinhart Viane wrote:
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manual site or a good mysql book?
That does not mean mysql questions should be
: [EMAIL PROTECTED]
Subject: Re: [PHP] MYSQL Query question
>Reinhart Viane wrote:
>And a last question:
>I always seem to get stuck on mysql queries when scripting. mysql.com
>gives me a headache whens earching something. Does someone know a good
>mysql manual site or a good mysql bo
Reinhart Viane wrote:
And a last question:
I always seem to get stuck on mysql queries when scripting. mysql.com
gives me a headache whens earching something. Does someone know a good
mysql manual site or a good mysql book?
That does not mean mysql questions should be posted on php mailing lists
Thanks, I knew it was something simple but I couldn't find it on the 'Net.
Robbert van Andel
-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 1:14 PM
To: Van Andel, Robbert; [EMAIL PROTECTED]
Subject: Re: [PHP] Mysql Quer
$string = "'" . implode("','",$group) . "'";
$query = "SELECT * FROM table WHERE groupname IN ($string)";
---John Holmes...
- Original Message -
From: "Van Andel, Robbert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 3:51 PM
Subject: [PHP] Mysql Query Question
If you're trying to be able to keep reference to the order the records are
added to the table, simply add a date/time field and populate it with the
date/time now() when you insert. You can then sort on that as needed later.
- Original Message -
From: "Phil Schwarzmann" <[EMAIL PROTECTED]>
If you are using a table with AUTO_INCREMENT set for one of the fields,
the default is for MySQL to assign any new row an AUTO_INCREMENT value
that is one higher than the currently highest value in that column. In
other words, MySQL by default does exactly what you say you are trying
to do.
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Jeff Holzfaster") wrote:
> This works: select date_format(date, "%W, %e %M %Y") as date from table
> This doesn't: select concat(date_format(date, "%W, %e %M %Y")," ",time) as
> time_of_day
>
> I'm wondering if it is possible to use concat i
> The MySQL manual has a chapter on date/time factions. Or is it
> the 'order
> by' clause that's giving you trouble...? I assume that 'date' is a
> reserved word, so it may be confusing mysql. In which case, try using a
> different alias, like 'f_date".
This works: select date_format(dat
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Jeff Holzfaster") wrote:
> I have a couple questions... first, is there a notable MySQL General List
> like this one?
Yes. The list on mysql.com is quite active and, like this one, it's common
to get responses directly from one of the develo
32 matches
Mail list logo