Re: [PHP] mySQL query assistance...

2010-11-29 Thread Daniel P. Brown
On Mon, Nov 29, 2010 at 14:40, Daniel P. Brown wrote: >    For your convenience, both have been CC'd on this email. Actually, PHP-DB (php...@lists.php.net) was accidentally BCC'd. -- Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/

Re: [PHP] mySQL query assistance...

2010-11-29 Thread Daniel P. Brown
On Mon, Nov 29, 2010 at 14:35, Don Wieland 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, write to the MySQL

[PHP] mySQL query assistance...

2010-11-29 Thread Don Wieland
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 ;-) Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] MySQL Query Help

2010-11-22 Thread Simcha Younger
On Sun, 21 Nov 2010 11:19:04 -0700 "Ben Miller" wrote: > > To help clarify - the 3 tables look something like the following (tableName > => column,column,column...): > > Products => product_id,product_name,product_description... (key = > product_id) > Criteria => criteria_id,criteria_title,cri

RE: [PHP] MySQL Query Help

2010-11-21 Thread Ben Miller
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 joi

Re: [PHP] MySQL Query Help

2010-11-21 Thread PW
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 jo

Re: [PHP] MySQL Query Help

2010-11-20 Thread Simcha Younger
On Sat, 20 Nov 2010 13:54:29 -0700 "Ben Miller" 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 have a tables

RE: [PHP] MySQL Query Help

2010-11-20 Thread admin
Richard L. Buskirk -Original Message- From: Ben Miller [mailto:biprel...@gmail.com] Sent: Saturday, November 20, 2010 3:54 PM To: 'php-general' Subject: [PHP] MySQL Query Help Hi, I'm building a website for a client in which I need to compare their products, side-by-

Re: [PHP] MySQL Query Help

2010-11-20 Thread Richard West
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 client

[PHP] MySQL Query Help

2010-11-20 Thread Ben Miller
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 have a tables named "products","criteria" and "criteria_values" If I have something

Re: [PHP] MySQL Query Puzzle

2010-07-20 Thread Shreyas Agasthya
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 wrote: > Peter wrote: > >> Hi All, >> >> I have a table which contain's some dup

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread Jim Lucas
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 exe

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread Shreyas Agasthya
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 wrote: > How about this : > > CREATE

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread Shreyas Agasthya
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 wrote: > On 19 July 2010 05:44, Peter wrote: > > Hi All, > > > > I have a table

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread Richard Quadling
On 19 July 2010 15:01, Richard Quadling wrote: > On 19 July 2010 05:44, 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 >>

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread Richard Quadling
On 19 July 2010 05:44, 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 >

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread Peter
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 FROM

Re: [PHP] MySQL Query Puzzle

2010-07-19 Thread shiplu
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 List

Re: [PHP] MySQL Query Puzzle

2010-07-18 Thread Shafiq Rehman
On Mon, Jul 19, 2010 at 10:44 AM, 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 >

Re: [PHP] MySQL Query Puzzle

2010-07-18 Thread Paul M Foster
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 >

[PHP] MySQL Query Puzzle

2010-07-18 Thread Peter
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, Aft

[PHP] mysql query returning slowly

2010-04-06 Thread David Murphy
This is from our application I enabled profile in mysql to determine why an update took 20seconds. As you can see MySQL reported no where near that amount of duration took place. Is there any way I can dig into php and determine why mysql client libs are so slow (this is not using mysqlnd bu

Re: [PHP] MySQL query not working!

2010-03-31 Thread tedd
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 d

Re: [PHP] MySQL query not working!

2010-03-31 Thread Andrew Ballard
On Wed, Mar 31, 2010 at 9:08 AM, Andrew Ballard wrote: > Nope. All it does is suppress the error message. Just try it: > > > @mysql_connect('localhost', 'baduser', 'badpassword') or die('Could > not connect'); > > ?> > > Output: > Could not connect > > @mysql_connect('localhost', 'baduser', 'bad

Re: [PHP] MySQL query not working!

2010-03-31 Thread Midhun Girish
should have put: > >> > >> if (mysql_num_rows($result)) > >> > >> rather than just > >> > >> if ($result) > >> > >> Thanks! > >> - Original Message - > >> From: "Andre Polykanine" >

Re: [PHP] MySQL query not working!

2010-03-31 Thread Andrew Ballard
t;> >> if (mysql_num_rows($result)) >> >> rather than just >> >> if ($result) >> >> Thanks! >> ----- Original Message - >> From: "Andre Polykanine" >> To: "Parham Doustdar" >> Cc: >> Sent: Wednesday,

Re: [PHP] MySQL query not working!

2010-03-31 Thread Midhun Girish
gt; > - Original Message - > > From: "Andre Polykanine" > > To: "Parham Doustdar" > > Cc: > > Sent: Wednesday, March 31, 2010 4:41 PM > > Subject: Re: [PHP] MySQL query not working! > > > > > > > Hell

Re: [PHP] MySQL query not working!

2010-03-31 Thread Ashley Sheridan
gt; Thanks! > - Original Message - > From: "Andre Polykanine" > To: "Parham Doustdar" > Cc: > Sent: Wednesday, March 31, 2010 4:41 PM > Subject: Re: [PHP] MySQL query not working! > > > > Hello Parham, > > > > Adding to Ash&#x

Re[2]: [PHP] MySQL query not working!

2010-03-31 Thread Andre Polykanine
arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Parham Doustdar To: Andre Polykanine Date: Wednesday, March 31, 2010, 3:20:54 PM Subject: [PHP] MySQL query not working! Andre, The @ op

Re: [PHP] MySQL query not working!

2010-03-31 Thread Alexey Bovanenko
kanine; ICQ: 191749952 > Twitter: m_elensule > > - Original message - > From: Parham Doustdar > To: php-general@lists.php.net > Date: Wednesday, March 31, 2010, 2:50:07 PM > Subject: [PHP] MySQL query not working! > > Hi there, > Here is a snippet of cod

Re: [PHP] MySQL query not working!

2010-03-31 Thread Parham Doustdar
tween the apostrophes is given. And, I found out what the problem was; I should have put: if (mysql_num_rows($result)) rather than just if ($result) Thanks! - Original Message - From: "Andre Polykanine" To: "Parham Doustdar" Cc: Sent: Wednesday, March 31, 2010

Re: [PHP] MySQL query not working!

2010-03-31 Thread Andre Polykanine
_elensule - Original message - From: Parham Doustdar To: php-general@lists.php.net Date: Wednesday, March 31, 2010, 2:50:07 PM Subject: [PHP] MySQL query not working! Hi there, Here is a snippet of code... that doesn't work for some reason. Please note that I have put some @mysql_query(

Re: [PHP] MySQL query not working!

2010-03-31 Thread Ashley Sheridan
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

[PHP] MySQL query not working!

2010-03-31 Thread Parham Doustdar
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 download. This is supposed to be a file download c

Re: [PHP] php/mysql Query Question.

2009-09-16 Thread Jim Lucas
-html > This now will return all results in an html format from all queries. > > Now I could “tee” this to a file and save the results returned if I so choose > to save the result of the display . > > Let’s say I want to be lazy and write a php MySQL query to do the same so

Re: [PHP] php/mysql Query Question.

2009-09-16 Thread Robert Cummings
ad...@buskirkgraphics.com wrote: I tend to do this robert, while looking at your example i thought to myself since i am trying to mimick a shell command why not run one. Result: $ddvery"; ?> Not are the results safe but the unlimited possibilites are amazing. Thanks so much for the kick sta

Re: [PHP] php/mysql Query Question.

2009-09-16 Thread admin
I tend to do this robert, while looking at your example i thought to myself since i am trying to mimick a shell command why not run one. Result: $ddvery"; ?> Not are the results safe but the unlimited possibilites are amazing. Thanks so much for the kick starter ad...@buskirkgraphics.com wr

[PHP] Re: php/mysql Query Question.

2009-09-16 Thread Peter Ford
-html > This now will return all results in an html format from all queries. > > Now I could “tee” this to a file and save the results returned if I so choose > to save the result of the display . > > Let’s say I want to be lazy and write a php MySQL query to do the same so

Re: [PHP] php/mysql Query Question.

2009-09-15 Thread Robert Cummings
ad...@buskirkgraphics.com wrote: Would you mind giving me an example of this that i can stick right into a blank php file and run. I get what you are saying but i cant seem to make that even echo out the data. php 5.2 mysql 5.1.3 Apache 2.2 Cheers, Rob. -- http://www.interjinn.com Applica

Re: [PHP] php/mysql Query Question.

2009-09-15 Thread Robert Cummings
all results in an html format from all queries. Now I could “tee” this to a file and save the results returned if I so choose to save the result of the display . Let’s say I want to be lazy and write a php MySQL query to do the same so that any result I queried for would return the html results

[PHP] php/mysql Query Question.

2009-09-15 Thread admin
all queries. Now I could “tee” this to a file and save the results returned if I so choose to save the result of the display . Let’s say I want to be lazy and write a php MySQL query to do the same so that any result I queried for would return the html results in a table without actually writing

Re: [PHP] mySQL query question

2008-11-16 Thread Jim Lucas
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

Re: [PHP] mySQL query question

2008-11-16 Thread Chris
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

Re: [PHP] mySQL query question

2008-11-15 Thread Jim Lucas
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

Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
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

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
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

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
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

Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
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

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
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

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
[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

Re: [PHP] mySQL query question

2008-11-14 Thread mikesd1
>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

Re: [PHP] mySQL query question

2008-11-14 Thread Bastien Koert
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

Re: [PHP] mySQL query question

2008-11-14 Thread Jim Lucas
[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

Re: [PHP] mySQL query question

2008-11-14 Thread mikesd1
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)

Re: [PHP] mySQL query question

2008-11-14 Thread Bastien Koert
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

[PHP] mySQL query question

2008-11-14 Thread ceo
> 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 pu

Re: [PHP] mySQL query question

2008-11-14 Thread Martijn Korse
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

Re: [PHP] mySQL query question

2008-11-14 Thread Thodoris
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

Re: [PHP] mySQL query question

2008-11-14 Thread Michael S. Dunsavage
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

Re: [PHP] mySQL query question

2008-11-13 Thread Jochem Maas
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

Re: [PHP] mySQL query question

2008-11-13 Thread Michael S. Dunsavage
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

Re: [PHP] mySQL query question

2008-11-13 Thread Micah Gersten
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

[PHP] mySQL query question

2008-11-13 Thread Michael S. Dunsavage
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; now here's the problem I want to add 1 to

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-08 Thread Chris
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

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-08 Thread Sanjeev N
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 th

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Chris
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

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Jim Lucas
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

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Waynn Lue
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 lin

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Jim Lucas
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 databas

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Jim Lucas
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 wil

Re: [PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Wolf
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 int

[PHP] mysql query and maximum characters in sql statement

2008-05-01 Thread Sanjeev N
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 will be more than 5000

Re: [PHP] php - mysql query issue

2006-09-15 Thread Richard Lynch
On Fri, September 15, 2006 7:35 am, Dave Goodchild wrote: > Hi all. I am building an online events listing and when I run the > following > query I get the expected result set: > Any ideas why not? I know it's more of a mySQL question so apologies > in > advance! Well, you'd have to tell us what'

Re: [PHP] php - mysql query issue

2006-09-15 Thread Andrei
Also you should check if dates.date is a DATE type, not DATETIME. Lost some time on that when I wanted to select enregs for a specific date, field was DATETIME and I was querying `date` = '2006-01-01'... :p Andy Dave Goodchild wrote: > On 15/09/06, Brad Bonkoski <[EMAIL PROTECTED]

Re: [PHP] php - mysql query issue

2006-09-15 Thread Dave Goodchild
On 15/09/06, Brad Bonkoski <[EMAIL PROTECTED]> wrote: Have you tried echoing out your query to run on the backend itself? Maybe there is some problem with how your join is being constructed... Perhaps a left outer join is called for? Hard to tell without having knowledge of your table structure

Re: [PHP] php - mysql query issue

2006-09-15 Thread Brad Bonkoski
Have you tried echoing out your query to run on the backend itself? Maybe there is some problem with how your join is being constructed... Perhaps a left outer join is called for? Hard to tell without having knowledge of your table structure and table data... -B Dave Goodchild wrote: Hi all.

[PHP] php - mysql query issue

2006-09-15 Thread Dave Goodchild
Hi all. I am building an online events listing and when I run the following query I get the expected result set: SELECT events.id AS eventid, name, postcode, start_time, dates.date FROM events, dates_events, dates WHERE dates_events.event_id = events.id and dates_events.date_id = dates.id AND dat

Re: [PHP] mysql query/$post problem

2006-03-27 Thread Jasper Bryant-Greene
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, perh

Re: [PHP] mysql query/$post problem

2006-03-27 Thread PHP Mailer
Mark skrev: I havnt even tried this query but i know its wrong can anyone help! *** ** I am trying to insert the value of $avname into the users table, into the avatar field. Hello Mark, I think what you are trying

Re: [PHP] mysql query/$post problem

2006-03-27 Thread chris smith
On 3/27/06, Mark <[EMAIL PROTECTED]> wrote: > I havnt even tried this query but i know its wrong can anyone help! > > > *** > include("header.php"); > include("connect.php"); > > $comp_id = $_SESSION['comp_id']; > $user_id = $_SESSION['user_id']; > > // Grab var

Re: [PHP] mysql query/$post problem

2006-03-27 Thread nicolas figaro
Mark a écrit : I havnt even tried this query but i know its wrong can anyone help! *** don't you need a session_start() somewhere ? (or it's in the header.php or connect.php perhaps ?) $comp_id = $_SESSION['comp_id']; $user_id = $_SESSION['user_id']; //

[PHP] mysql query/$post problem

2006-03-27 Thread Mark
I havnt even tried this query but i know its wrong can anyone help! *** ** I am trying to insert the value of $avname into the users table, into the avatar field. -- PHP General Mailing List (http://www.php.net/) To unsu

Re: [PHP] mysql query

2005-09-15 Thread Mark Rees
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:

Re: [PHP] mysql query

2005-09-14 Thread Stephen Leaf
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:

[PHP] mysql query

2005-09-14 Thread Jesús Alain Rodríguez Santos
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: day 19 - month 05, I wish to know if there are previous days inserted at the 19, the

Re: [PHP] mysql query update two table in one?

2005-03-10 Thread Christian Heinrich
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->i

[PHP] mysql query update two table in one?

2005-03-10 Thread Tyler Replogle
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' "); and i was wonder

Re: [PHP] mysql query

2005-02-18 Thread Richard Lynch
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

Re: [PHP] mysql query

2005-02-17 Thread Bret Hughes
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 th

Re: [PHP] mysql query

2005-02-17 Thread Jason Petersen
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] >

Re: [PHP] mysql query

2005-02-17 Thread Bret Hughes
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

Re: [PHP] mysql query

2005-02-17 Thread Stephen Johnson
xt = $j+1; <> http://www.thelonecoder.com [EMAIL PROTECTED] 562.924.4454 (office) 562.924.4075 (fax) continuing the struggle against bad code */ ?> > From: "Sebastian" <[EMAIL PROTECTED]> > Date: Thu, 17 Feb 2005 19:24:50 -0500 > To: > Subject: [PHP] mys

Re: [PHP] mysql query

2005-02-17 Thread dan
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 like

[PHP] mysql query

2005-02-17 Thread Sebastian
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 like: << Previous

Re: [PHP] MYSQL Query question

2004-12-09 Thread Raditha Dissanayake
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

Re: [PHP] MYSQL Query question

2004-12-09 Thread John Nichel
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

RE: [PHP] MYSQL Query question

2004-12-09 Thread Reinhart Viane
: [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

Re: [PHP] MYSQL Query question

2004-12-09 Thread Raditha Dissanayake
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

[PHP] MYSQL Query question

2004-12-09 Thread Reinhart Viane
Table chat_online: session (varchar) activity (datetime) Table persons persons_region_int(int) Table regions region_id region_name On a page i list all persons which are in the chat_online dbase and within a certain period: $limit_time = time() - 130; // 2 Minutes time out. 60 * 2 = 120 $sql

RE: [PHP] mysql query with exclude

2004-11-28 Thread Reinhart Viane
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 something like: >> >>select * from chat c1, >&g

  1   2   3   4   >