On Mon, Nov 29, 2010 at 14:35, Don Wieland d...@dwdataconcepts.com wrote:
Hi all,
Is there a list/form to get some help on compiling mySQL queries? I am
executing them via PHP, but do not want to ask for help here if it is no the
appropriate forum. Thanks ;-)
Yes.
For MySQL queries,
On Mon, Nov 29, 2010 at 14:40, Daniel P. Brown
daniel.br...@parasane.net wrote:
For your convenience, both have been CC'd on this email.
Actually, PHP-DB (php...@lists.php.net) was accidentally BCC'd.
--
/Daniel P. Brown
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
SELECT * FROM products p LEFT JOIN criteria_values cv ON p.key=cv.key LEFT JOIN
criteria c ON cv.key=c.key WHERE c.value IS NOT NULL
Hard to answer without more detail, but I am guessing the answer will be
something like the above. Your question makes it hard to understand whether c
or cv is
SELECT * FROM products p LEFT JOIN criteria_values cv ON p.key=cv.key LEFT
JOIN criteria c ON cv.key=c.key WHERE c.value IS NOT NULL
Hard to answer without more detail, but I am guessing the answer will be
something like the above. Your question makes it hard to understand whether
c or cv is
I'm going to jump in and throw in my 2 cents...
Have you used dreamweaver?
I would suggest Dreamweaver to any new programmer beginning php/mysql.
It helped me out tremendously in the beginning. I'm not an advanced programmer
with hand coding classes yet, but I can get any job completed for
Since we are just tossing out development environments.
We moved to Aptana in conjunction with TortoiseSVN for a team environment
development timelines dropped.
Personally I do not feel any gui editor makes you a better programmer, maybe
you understand the fundamentals a little less.
Not that
On Sat, 20 Nov 2010 13:54:29 -0700
Ben Miller biprel...@gmail.com wrote:
Hi,
I'm building a website for a client in which I need to compare their
products, side-by-side, but only include criteria for which all selected
products have a value for that criteria.
In my database (MySQL), I
I am very keen to see a closure to this thread so that I can add to my
snippets.
Let's all know what worked best out of many solutions that have been
proposed.
--Shreyas
On Tue, Jul 20, 2010 at 10:07 AM, Jim Lucas li...@cmsws.com wrote:
Peter wrote:
Hi All,
I have a table which contain's
Use distinct.
SELECT DISTINCT COLUMN1, COLUMN2 FROM ... ...
Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)
--
PHP General Mailing
Hi Shiplu,
Thanks for reply.
Distinct function hide the duplicate records while we selecting the
record through the Query
i want to remove the duplicate entries in my table
i need a Delete Query instead of Select Query
shiplu wrote:
Use distinct.
SELECT DISTINCT COLUMN1, COLUMN2
On 19 July 2010 05:44, Peter pet...@egrabber.com wrote:
Hi All,
I have a table which contain's some duplicate rows. I just want to delete
the duplicate records alone
not original records.
Assume my table as look as below
column1 column2
1
a
1
a
2
b
3
c
On 19 July 2010 15:01, Richard Quadling rquadl...@gmail.com wrote:
On 19 July 2010 05:44, Peter pet...@egrabber.com wrote:
Hi All,
I have a table which contain's some duplicate rows. I just want to delete
the duplicate records alone
not original records.
Assume my table as look as below
How about this :
CREATE TEMPORARY TABLE bad_temp1 (id INT,name VARCHAR(20));
INSERT INTO bad_temp1 (id,name) SELECT DISTINCT id,name FROM SAMPLE;
Regards,
Shreyas
On Mon, Jul 19, 2010 at 7:31 PM, Richard Quadling rquadl...@gmail.comwrote:
On 19 July 2010 05:44, Peter pet...@egrabber.com
Just to add more perspective :
You will have a table with DISTINCT values.
Drop the initial table (better take a back-up); copy from the temporary
table which will have only DISTINCT values.
Regards,
Shreyas
On Mon, Jul 19, 2010 at 7:58 PM, Shreyas Agasthya shreya...@gmail.comwrote:
How
Peter wrote:
Hi All,
I have a table which contain's some duplicate rows. I just want to
delete the duplicate records alone
not original records.
Assume my table as look as below
column1 column2
1
a
1
a
2
b
3
c
3
c
i want the above table need to be as below, After
On Mon, Jul 19, 2010 at 10:14:30AM +0530, Peter wrote:
Hi All,
I have a table which contain's some duplicate rows. I just want to
delete the duplicate records alone
not original records.
Assume my table as look as below
column1 column2
1
a
1
a
2
b
3
c
3
On Mon, Jul 19, 2010 at 10:44 AM, Peter pet...@egrabber.com wrote:
Hi All,
I have a table which contain's some duplicate rows. I just want to delete
the duplicate records alone
not original records.
Assume my table as look as below
column1 column2
1
a
1
a
2
b
On Wed, 2010-03-31 at 16:20 +0430, Parham Doustdar wrote:
Hi there,
Here is a snippet of code... that doesn't work for some reason. Please note
that I have put some
@mysql_query($query) or die(mysql_error());
statements, to see if MySQL gives an error. I receive nothing other than the
Hello Parham,
Adding to Ash's question, why to use the @ operator before
mysql_query?
--
With best regards from Ukraine,
Andre
Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @
jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: m_elensule
- Original
Subject: Re: [PHP] MySQL query not working!
Hello Parham,
Adding to Ash's question, why to use the @ operator before
mysql_query?
--
With best regards from Ukraine,
Andre
Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @
jabber.org
Yahoo! messenger: andre.polykanine; ICQ
Hi!
To view error:
you must use mysql_query(). @ before mysql - error supression.
next
you can use the following:
$result=..
if($result){
if(mysql_num_rows($result)){
/* you have record in table */
}else{
/* you haven't */
On Wed, Mar 31, 2010 at 4:11 PM, Andre Polykanine
...@gmail.com
Cc: php-general@lists.php.net
Sent: Wednesday, March 31, 2010 4:41 PM
Subject: Re: [PHP] MySQL query not working!
Hello Parham,
Adding to Ash's question, why to use the @ operator before
mysql_query?
--
With best regards from Ukraine,
Andre
Skype: Francophile; WlmMSN
, 2010 4:41 PM
Subject: Re: [PHP] MySQL query not working!
Hello Parham,
Adding to Ash's question, why to use the @ operator before
mysql_query?
--
With best regards from Ukraine,
Andre
Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon
@
jabber.org
-
From: Andre Polykanine an...@oire.org
To: Parham Doustdar parha...@gmail.com
Cc: php-general@lists.php.net
Sent: Wednesday, March 31, 2010 4:41 PM
Subject: Re: [PHP] MySQL query not working!
Hello Parham,
Adding to Ash's question, why to use the @ operator before
mysql_query
an...@oire.org
To: Parham Doustdar parha...@gmail.com
Cc: php-general@lists.php.net
Sent: Wednesday, March 31, 2010 4:41 PM
Subject: Re: [PHP] MySQL query not working!
Hello Parham,
Adding to Ash's question, why to use the @ operator before
mysql_query?
--
With best
On Wed, Mar 31, 2010 at 9:08 AM, Andrew Ballard aball...@gmail.com wrote:
Nope. All it does is suppress the error message. Just try it:
?php
@mysql_connect('localhost', 'baduser', 'badpassword') or die('Could
not connect');
?
Output:
Could not connect
?php
@mysql_connect('localhost',
At 4:20 PM +0430 3/31/10, Parham Doustdar wrote:
Hi there,
Here is a snippet of code... that doesn't work for some reason. Please note
that I have put some
@mysql_query($query) or die(mysql_error());
statements, to see if MySQL gives an error. I receive nothing other than the
file starting to
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: shellmysql -uyourmom -plovesme --html
This now will return
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
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,
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 is
[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 originally were,
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
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
been all
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 inserted into the
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 fixing that, nothing gets
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,
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:
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
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=$queryconfirm;
Hi Jim Lucas,
You are correct... i want to run in the same way.
but as my 2 tables, column name are different i cant run the LOAD DATA
infile.
And the example you mentioned for break at 100, also i thought to use in
that way. but one of the column had the text type which we cant predict
about
Sanjeev N wrote:
Hi Jim Lucas,
You are correct... i want to run in the same way.
but as my 2 tables, column name are different i cant run the LOAD DATA
infile.
If you're inserting the same data, then use LOAD DATA INFILE to load it
into a temporary table, then use INSERT SELECT's to put
Waynn Lue wrote:
Wouldn't using LOAD DATA INFILE be better than writing your own script?
depends, does the data file match the table column for column?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jim Lucas wrote:
Waynn Lue wrote:
Wouldn't using LOAD DATA INFILE be better than writing your own script?
depends, does the data file match the table column for column?
Doesn't have to.
http://dev.mysql.com/doc/refman/5.0/en/load-data.html
By default, when no column list is provided at
Sanjeev N [EMAIL PROTECTED] wrote:
Hi,
I have written a program which imports the tab delimited file and insert all
the line from file to the mysql line by line.
I am succeding in the above case. but problem with the above method is its
taking to too much time while inserting into the
Sanjeev N wrote:
Hi,
I have written a program which imports the tab delimited file and insert all
the line from file to the mysql line by line.
I am succeding in the above case. but problem with the above method is its
taking to too much time while inserting into the database.
The file's size
Jim Lucas wrote:
Sanjeev N wrote:
Hi,
I have written a program which imports the tab delimited file and
insert all
the line from file to the mysql line by line.
I am succeding in the above case. but problem with the above method is
its
taking to too much time while inserting into the
Wouldn't using LOAD DATA INFILE be better than writing your own script?
On 5/1/08, Jim Lucas [EMAIL PROTECTED] wrote:
Jim Lucas wrote:
Sanjeev N wrote:
Hi,
I have written a program which imports the tab delimited file and
insert all
the line from file to the mysql line by line.
I
Mark a écrit :
I havnt even tried this query but i know its wrong can anyone help!
***
?php
include(header.php);
include(connect.php);
don't you need a session_start() somewhere ?
(or it's in the header.php or connect.php perhaps ?)
$comp_id =
On 3/27/06, Mark [EMAIL PROTECTED] wrote:
I havnt even tried this query but i know its wrong can anyone help!
***
?php
include(header.php);
include(connect.php);
$comp_id = $_SESSION['comp_id'];
$user_id = $_SESSION['user_id'];
// Grab variables and
Mark skrev:
I havnt even tried this query but i know its wrong can anyone help!
***
?php
include(header.php);
include(connect.php);
$comp_id = $_SESSION['comp_id'];
$user_id = $_SESSION['user_id'];
// Grab variables and insert into database
$avname =
PHP Mailer wrote:
Mark skrev:
[snip]
$query = INSERT INTO users AVATARS WHERE id =$user_id '','$avname');
mysql_query($query);s
[snip]
I am trying to insert the value of $avname into the users table, into
the avatar field.
I think what you are trying to do is coordinated a bit wrong,
On Wednesday 14 September 2005 07:36 pm, Jesús Alain Rodríguez Santos wrote:
I have a table colum in mysql with two fields: day and month. I
would like to know if it's possible to make a query where I can
determine if exist days before to a selected day, for example:
if I have in my table:
On Wednesday 14 September 2005 07:36 pm, Jesús Alain Rodríguez Santos wrote:
I have a table colum in mysql with two fields: day and month. I
would like to know if it's possible to make a query where I can
determine if exist days before to a selected day, for example:
if I have in my table:
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' );
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
Now I am assuming that 4 and 6 would not always be the next article ID -
otherwise you could just increment your id accordingly.
If you wanted to do that without running multiple queries, this is who I
might do it, rather sloppy, but I think it would work.
$idGet= $_GET['id'];
$sql = select id,
On Thu, 2005-02-17 at 18:24, 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
On 17 Feb 2005 19:28:18 -0600, Bret Hughes [EMAIL PROTECTED] wrote:
On Thu, 2005-02-17 at 18:24, 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
On Thu, 2005-02-17 at 22:02, Jason Petersen wrote:
On 17 Feb 2005 19:28:18 -0600, Bret Hughes [EMAIL PROTECTED] wrote:
On Thu, 2005-02-17 at 18:24, Sebastian wrote:
Hello,
im working on an article system and looking to avoid running three
queries.
example, i have this query:
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
To: [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 book?
That does
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
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
.user2_sessionid = $thisuser));
Can I do something like this?
-Original Message-
From: Ligaya Turmelle [mailto:[EMAIL PROTECTED]
Sent: zondag 28 november 2004 2:25
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql query with exclude
Sounds like you need a join. Maybe
.user1_sessionid =
$thisuser)) or (c2.user1_sessionid if(c1.user2_sessionid =
$thisuser));
Can I do something like this?
-Original Message-
From: Ligaya Turmelle [mailto:[EMAIL PROTECTED]
Sent: zondag 28 november 2004 2:25
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mysql query
Sounds like you need a join. Maybe something like:
select * from chat c1,
chat_online c2
where
UNIX_TIMESTAMP(c2.activity)=$limit_time and
c2.session_id = $thisuser and
((c1.user1_sessionid = $thisuser) or
c1.user2_sessionid = $thisuser));
Select date1,count(date1) group by date1 where date1 '$today'
That'll get you the count of how many records were done on each day
(excluding today). I don't know what you're trying to average, but you
can probably figure it out from there.
-TG
-Original Message-
From: Jeff Oien
From: Jeff Oien [EMAIL PROTECTED]
I have a database with a date field in this format
20041016
I'd like to count how many records were made on each day (except today)
and average them. Can I do this in one query or will I need to do some
more PHP stuff after I get some results? Thanks.
Bare
[snip]
I have a database with a date field in this format
20041016
I'd like to count how many records were made on each day (except today)
and average them. Can I do this in one query or will I need to do some
more PHP stuff after I get some results? Thanks.
Bare bones so far:
$sql = select
On Thu, 16 Sep 2004 15:15:01 -0400, John Holmes
[EMAIL PROTECTED] wrote:
You can't get the average and a count in the same query
Sure you can.
desc numbers;
++-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
[snip]
You can't get the average and a count in the same query
Sure you can.
mysql select count(number), avg(number) from numbers;
+---+-+
| count(number) | avg(number) |
+---+-+
|18 | 2.3889 |
+---+-+
1
From: Greg Donald [EMAIL PROTECTED]
You can't get the average and a count in the same query
Sure you can.
mysql select count(number), avg(number) from numbers;
Depends how you interpret his request, I guess. I took it as a request for
the count of records per day and then the average of those
On Thu, 16 Sep 2004 16:08:45 -0400, John Holmes
[EMAIL PROTECTED] wrote:
Depends how you interpret his request, I guess. I took it as a request for
the count of records per day and then the average of those counts.
So, if you had
D1
D1
D1
D1
D2
D2
D3
The count would be
D1 - 4
John Holmes wrote:
From: Greg Donald [EMAIL PROTECTED]
You can't get the average and a count in the same query
Sure you can.
mysql select count(number), avg(number) from numbers;
Depends how you interpret his request, I guess. I took it as a request
for the count of records per day and then the
From: Greg Donald [EMAIL PROTECTED]
mysql select the_date, count(number), avg(number) from dates group by
the_date;
++---+-+
| the_date | count(number) | avg(number) |
++---+-+
| 2004-01-01 | 3 | 2. |
|
[snip]
mysql desc dates;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| the_date | date| YES | | NULL| |
| number | int(11) | | | 0 | |
Michael
just wanted to thank you through the group for your time.
U R A Star...!
--
-
Michael Mason
Arras People
www.arraspeople.co.uk
-
Michael Egan [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Have a look at the mysql
Glad to be of help. I'm sure there will be many more occasions when I'm badly in need
of assistance.
Cheers,
Michael
-Original Message-
From: Harlequin [mailto:[EMAIL PROTECTED]
Sent: 02 July 2004 13:55
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL QUERY Results Not Appearing[Scanned
Have a look at the mysql functions in the PHP manual - i.e.
http://uk.php.net/mysql_query
I'm also certain this question has been raised fairly recently on the list. All
mysql_query is going to do is either open up the resource or not. You'll need to use
something else to display the data.
No other way. Use one query to count the total record and then another
query for limiting
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
Is this right? Is there other efficent way to do it?
What about if data changes (i.e. new records are added) while the user
browses through pages?
[/snip]
on each page do a:
SELECT count(*) FROM table WHERE your_condition
this will give you your total number of results
--
PHP General
[snip]
I just can't find the forum for any mysql.
[/snip]
http://www.mysql.com/doc/en/Mailing-list.html
[snip]
anyways maybe someone run into this kind of problem, i'm saving in a db
records of company and in a column i have numbers i.e 1,2,12,31,32 so
if want to search a company that has
or just read the manual at mysql.com ..
Jay Blanchard [EMAIL PROTECTED] wrote:
[snip]
I just can't find the forum for any mysql.
[/snip]
http://www.mysql.com/doc/en/Mailing-list.html
[snip]
anyways maybe someone run into this kind of problem, i'm saving in a db
records of company
[snip]
or just read the manual at mysql.com ..
[/snip]
Top posting.
What's annoying?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jason Giangrande wrote:
UPDATE link SET hits = hits+1 WHERE website_link = '$link'
$link is the website link that was clicked on.
The query works fine. The problem is if $link is a website that does
not exist in the database mysql_query(); still returns true even though
nothing was updated.
On Wednesday 28 January 2004 12:05, Jason Giangrande wrote:
I have the following query.
UPDATE link SET hits = hits+1 WHERE website_link = '$link'
$link is the website link that was clicked on.
The query works fine. The problem is if $link is a website that does
not exist in the database
Hello Ashley,
Monday, January 12, 2004, 8:21:01 PM, you wrote:
AMK What I'd like to do is search for records that are between
AMK 2004-01-09 and 2004-01-04. The time is to be ignored, just the date is
AMK what I need to search by. Is there a way to do this within an sql
AMK query, or do I
From: Ashley M. Kirchner [EMAIL PROTECTED]
I need to query for record within a certain date stamp. The
datetime field contains the createdon information that i need and is in
the following format: 2004-01-11 21:40:50
What I'd like to do is search for records that are between
Richard Davey wrote:
RD SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09
RD 00:00:00' AND '2004-01-04 23:59:59'
Actually sorry, inverse the seconds (put the 00:00:00 onto the lower
date, the 4th) so it encompasses the whole period. You might actually
be able to not even
From: Ashley M. Kirchner [EMAIL PROTECTED]
RD SELECT whatever FROM table WHERE date_column_name BETWEEN '2004-01-09
RD 00:00:00' AND '2004-01-04 23:59:59'
Actually sorry, inverse the seconds (put the 00:00:00 onto the lower
date, the 4th) so it encompasses the whole period. You might
Hi,
Friday, October 3, 2003, 8:17:23 PM, you wrote:
CM ok im stumped lol i have used this code in the past to insert data into
CM mysql (im relitively new though)
CM --code
CM mysql_query(INSERT INTO Images (Image, desc) VALUES ('$name',
CM '$description')) or die (mysql_error());
CM
1 - 100 of 184 matches
Mail list logo