Re: [PHP] mysql query with exclude

2004-11-27 Thread Ligaya Turmelle
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));

[PHP] php, mySQL query character problem

2004-09-22 Thread Victor C.
Hi, I have a query to mysql basically saying: $query = select * from table1 where colum1 like '$email%'; //where $email is defined string. When i echo $query, I get the string : select * from table 1 where colum1 like 'testdata%' If i copy paste the string into phpMyAdmin SQL, the

RE: [PHP] php, mySQL query character problem

2004-09-22 Thread Jay Blanchard
[snip] $query = select * from table1 where colum1 like '$email%'; $returnValue = QueryDatabase($query); echo mysql_num_rows($returnValue); I always get 0 for the # of records. [/snip] You have not included the code from your QueryDatabase

Re: [PHP] php, mySQL query character problem

2004-09-22 Thread Curt Zirzow
* Thus wrote Victor C.: If i copy paste the string into phpMyAdmin SQL, the query executes successfully and returns one record. However, when I just do$returnValue = QueryDatabase($query); echo

[PHP] MySQL query for average records per day

2004-09-16 Thread Jeff Oien
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 date1 from

RE: [PHP] MySQL query for average records per day

2004-09-16 Thread Gryffyn, Trevor
[mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 2:35 PM To: PHP Subject: [PHP] MySQL query for average records per day 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

Re: [PHP] MySQL query for average records per day

2004-09-16 Thread John Holmes
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

RE: [PHP] MySQL query for average records per day

2004-09-16 Thread Jay Blanchard
[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

Re: [PHP] MySQL query for average records per day

2004-09-16 Thread Greg Donald
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 |

RE: [PHP] MySQL query for average records per day OT

2004-09-16 Thread Jay Blanchard
[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

Re: [PHP] MySQL query for average records per day

2004-09-16 Thread John Holmes
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

Re: [PHP] MySQL query for average records per day

2004-09-16 Thread Greg Donald
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

Re: [PHP] MySQL query for average records per day

2004-09-16 Thread Jeff Oien
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

Re: [PHP] MySQL query for average records per day

2004-09-16 Thread John Holmes
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. | |

RE: [PHP] MySQL query for average records per day OT

2004-09-16 Thread Jay Blanchard
[snip] mysql desc dates; +--+-+--+-+-+---+ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-+---+ | the_date | date| YES | | NULL| | | number | int(11) | | | 0 | |

[PHP] PHP - mySQL query question

2004-07-25 Thread Karl-Heinz Schulz
I have a simple question (not for me). Why does this query does not work? $links_query = mysql_query(select id, inserted, title, information, international from links WHERE international = y; order by inserted desc LIMIT 0 , 30); The information for the international fields are: Field:

Re: [PHP] PHP - mySQL query question

2004-07-25 Thread John W. Holmes
Karl-Heinz Schulz wrote: I have a simple question (not for me). Why does this query does not work? $links_query = mysql_query(select id, inserted, title, information, international from links WHERE international = y; order by inserted desc LIMIT 0 , 30); The information for the

Re: [PHP] PHP - mySQL query question

2004-07-25 Thread Jason Davidson
single quote 'y' Jason On Sun, 25 Jul 2004 11:05:23 -0400, Karl-Heinz Schulz [EMAIL PROTECTED] wrote: I have a simple question (not for me). Why does this query does not work? $links_query = mysql_query(select id, inserted, title, information, international from links WHERE

Re: [PHP] MySQL QUERY Results Not Appearing[Scanned]

2004-07-02 Thread Harlequin
] Subject: [PHP] MySQL QUERY Results Not Appearing[Scanned] Hi all... Despite being able to make a connection to the server and execute a query I am unable to do this through PHP using the following commands: echo h3active members should appear here/h3; $query = SELECT * FROM RegisteredMembers

RE: [PHP] MySQL QUERY Results Not Appearing[Scanned]

2004-07-02 Thread Michael Egan
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

[PHP] MySQL QUERY Results Not Appearing

2004-06-30 Thread Harlequin
Hi all... Despite being able to make a connection to the server and execute a query I am unable to do this through PHP using the following commands: echo h3active members should appear here/h3; $query = SELECT * FROM RegisteredMembers; $result = mysql_query($query) or die (could not execute

RE: [PHP] MySQL QUERY Results Not Appearing[Scanned]

2004-06-30 Thread Michael Egan
2004 12:42 To: [EMAIL PROTECTED] Subject: [PHP] MySQL QUERY Results Not Appearing[Scanned] Hi all... Despite being able to make a connection to the server and execute a query I am unable to do this through PHP using the following commands: echo h3active members should appear here/h3; $query

[PHP] R: [PHP] MYSQL Query results in pages

2004-06-25 Thread Alessandro Vitale
the mysql_num_rows() function and it will return the number of total rows rather than just $limit. cheers, Alessandro -Messaggio originale- Da: Matt Matijevich [mailto:[EMAIL PROTECTED] Inviato: giovedi 24 giugno 2004 21.41 A: [EMAIL PROTECTED]; [EMAIL PROTECTED] Oggetto: Re: [PHP] MYSQL

Re: [PHP] MYSQL Query results in pages

2004-06-25 Thread Geethanandh Kandasamy
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

[PHP] MYSQL Query results in pages

2004-06-24 Thread Gus
Hi. I want to query some data in MYSQL and show the results in page order in some fashion (ORDER BY ...) I've been using the LIMIT sentence like this LIMIT offset, max_per_page so if max_per_page = 5 then the first time the sentence will be LIMIT 0, 5, in page 2 LIMIT 5,5 and so no. My

Re: [PHP] MYSQL Query results in pages

2004-06-24 Thread Matt Matijevich
[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

[PHP] mysql query with php

2004-03-09 Thread tony
Hi, I just can't find the forum for any mysql. 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 number 2 i do category REGEXP '2' but the problem it will return

RE: [PHP] mysql query with php

2004-03-09 Thread Jay Blanchard
[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

RE: [PHP] mysql query with php

2004-03-09 Thread Jason Davidson
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

RE: [PHP] mysql query with php {ot}

2004-03-09 Thread Jay Blanchard
[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

[PHP] MySQL query

2004-01-27 Thread Jason Giangrande
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 mysql_query(); still returns true even though nothing was

Re: [PHP] MySQL query

2004-01-27 Thread John W. Holmes
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.

Re: [PHP] MySQL query

2004-01-27 Thread Jason Wong
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

[PHP] MySQL query

2004-01-12 Thread Ashley M. Kirchner
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 2004-01-09 and 2004-01-04. The time is to be

Re: [PHP] MySQL query

2004-01-12 Thread Richard Davey
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

Re[2]: [PHP] MySQL query

2004-01-12 Thread Richard Davey
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 include the seconds, try

Re: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
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

Re: Re[2]: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
From: Richard Davey [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 actually

Re: [PHP] MySQL query

2004-01-12 Thread Ashley M. Kirchner
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

Re: [PHP] MySQL query

2004-01-12 Thread CPT John W. Holmes
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

Re[2]: [PHP] MySQL query

2004-01-12 Thread Richard Davey
Hello Ashley, Monday, January 12, 2004, 8:43:07 PM, you wrote: AMK Assume I don't know what those dates are. I need to search based on AMK whatever the current date is, and search between 2 and 7 days back. The AMK dates in my previous post were simply an example. Somewhat important

[PHP] mysql query

2003-10-03 Thread Cameron Metzke
ok im stumped lol i have used this code in the past to insert data into mysql (im relitively new though) --code mysql_query(INSERT INTO Images (Image, desc) VALUES ('$name', '$description')) or die (mysql_error()); --end code- but i get this error] -error-

Re: [PHP] mysql query

2003-10-03 Thread Tom Rogers
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

Re: [PHP] mysql query

2003-10-03 Thread Cameron Metzke
Thanx Tom, i should of realized that lol. Again Thanx :) Tom Rogers [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] 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

Re: [PHP] mysql query

2003-10-03 Thread Nicholas Robinson
DESC is a reserved word (used to indicate a DESCending ORDER bY). N On Friday 03 Oct 2003 11:17 am, Cameron Metzke wrote: ok im stumped lol i have used this code in the past to insert data into mysql (im relitively new though) --code mysql_query(INSERT INTO Images (Image, desc)

[PHP] MySql Query Help: COUNT()

2003-09-13 Thread [-^-!-%-
Hello everyone! I'm trying to get the total number of a certain records from a database, but the result is always '1'. Please advise! =MySql Table = =activitiy = id | employee_id | project_id | date 1 | 45 | 60 | 2003-09-09 2 | 34 | 10 | 2003-09-10 3

Re: [PHP] MySql Query Help: COUNT()

2003-09-13 Thread John W. Holmes
I'm trying to get the total number of a certain records from a database, but the result is always '1'. Please advise! =MySql Table = =activitiy = id | employee_id | project_id | date 1 | 45 | 60 | 2003-09-09 2 | 34 | 10 | 2003-09-10 3 | 45 | 45

Re: [PHP] PHP - MySQL Query...

2003-08-14 Thread Marcus Edvardsson
I'm used to do like this: $query = 'SELECT * FROM cities'; $result = mysql_query($query); if($row = mysql_fetch_array($result)) do { echo ('tr td class=city' . $row[0] . ', ' . $row[1] . '/td td' . $row[2] . '/td td' . $row[3] . /td /tr\n); } while ($row = mysql_fetch_array($result));

Re: [PHP] PHP - MySQL Query...

2003-08-14 Thread Ivo Fokkema
This is not true, the resource link identifier is optional! If unspecified, the last opened link is used. My suggestion is to check the results of mysql_error() for more information on the failed query. HTH, Ivo Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] $dbh

RE: [PHP] PHP - MySQL Query...

2003-08-14 Thread Jay Blanchard
[snip] This is not true, the resource link identifier is optional! If unspecified, the last opened link is used. My suggestion is to check the results of mysql_error() for more information on the failed query. [/snip] You are right, of course...my sleepy brain just glanced at the code and fired

Re: [PHP] PHP - MySQL Query...

2003-08-14 Thread Curt Zirzow
* Thus wrote Steven Kallstrom ([EMAIL PROTECTED]): Hello all... I'm embarrassed by this one... I think it should work but it isn't... $query = 'SELECT * FROM cities'; $result = mysql_query($query); while ($row = mysql_fetch_row($result)) { getting this error:

Re: [PHP] PHP - MySQL Query...

2003-08-14 Thread murugesan
Try this, $result = mysql_query($query,$dbh); -Murugesan - Original Message - From: Jay Blanchard [EMAIL PROTECTED] To: Steven Kallstrom [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Sent: Thursday, August 14, 2003 4:50 PM Subject: RE: [PHP] PHP - MySQL Query... [snip] $dbh

[PHP] PHP - MySQL Query...

2003-08-14 Thread Steven Kallstrom
Hello all... I'm embarrassed by this one... I think it should work but it isn't... $dbh = mysql_connect(localhost, login, password) or die('cannot connect to the database because: ' . mysql_error()); mysql_select_db(database); $query = 'SELECT * FROM cities'; $result =

Re: [PHP] PHP - MySQL Query...

2003-08-14 Thread Michael A Smith
Steven Kallstrom wrote: Hello all... I'm embarrassed by this one... I think it should work but it isn't... $dbh = mysql_connect(localhost, login, password) or die('cannot connect to the database because: ' . mysql_error()); mysql_select_db(database); $query = 'SELECT * FROM cities';

RE: [PHP] PHP - MySQL Query...

2003-08-14 Thread Jay Blanchard
[snip] $dbh = mysql_connect(localhost, login, password) or die('cannot connect to the database because: ' . mysql_error()); mysql_select_db(database); $query = 'SELECT * FROM cities'; $result = mysql_query($query); while ($row = mysql_fetch_row($result)) { echo ('tr td

Re: [PHP] Mysql query and PHP loops

2003-08-01 Thread Nicholas Robinson
I think this does what you want. You can probably extend it to do the final check for val3 vs. val2 select distinct t1.val1, max( t1.id ), t1.val2 from table as t1, table as t2 where t1.val2 = t2.val2 group by t1.val1; HTH On Thursday 31 Jul 2003 3:22 pm, Petre Agenbag wrote: Hi List

Re: [PHP] Mysql query and PHP loops

2003-08-01 Thread Nicholas Robinson
On further reflection, my first attempt works for the specific example but may not in the general case. Try using a combination of max( ...id ) and min( ...val2 ) and add t1.val2 to the group by clause. This might work, but I've deleted my test files now! On Friday 01 Aug 2003 7:04 am,

[PHP] Mysql query and PHP loops

2003-07-31 Thread Petre Agenbag
Hi List I've been trying to do something with one MySQL query, but I don't think it is possible, so, I would need to probably do multiple queries, and possibly have queries inside loops, but I am rather weary of that so, I'd like your views/possible solutions to doing the following: Consider

[PHP] MySQL query/PHP logic?

2003-07-29 Thread Petre Agenbag
Hi List OK, I've posted this on the MySQL list as well, but it seems a bit quiet there, and arguably it could definately be a PHP rather than mysql question depending on whether it can be done with one query (then it was/is a mysql query), or whether it should be done with some structures and

RE: [PHP] MySQL query/PHP logic?

2003-07-29 Thread Jennifer Goodie
select * from main left join fof on main.id = fof.id left join pub on main.id = pub.id left join gov on main.id = gov.id left join med on main.id = med.id left join ngo on main.id = ngo.id left join own on

Re: [PHP] MySQL query/PHP logic?

2003-07-29 Thread Nicholas Robinson
Don't know whether it's just because it's late at night here in the UK or whether I'm being a bit dim, but wouldn't it be much, much easier to store all the data in your non-main tables in a single table and distinguish the type of data (i.e. fof, pub, gov, etc) by a field. This would

Re: [PHP] MySQL query/PHP logic?

2003-07-29 Thread Jim Lucas
- From: Petre Agenbag [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 2:13 PM Subject: [PHP] MySQL query/PHP logic? Hi List OK, I've posted this on the MySQL list as well, but it seems a bit quiet there, and arguably it could definately be a PHP rather than mysql

[PHP] MySQL query problems

2003-07-16 Thread Beauford.2005
Hi, Not sure if the problem here is PHP or MySQL, but here we go. I am trying to do two queries on a database - one after the other, but the second one never seems to get executed. The two queries are identical except for two variables. I have checked my form and they are correct and are being

Re: [PHP] MySQL query problems

2003-07-16 Thread Marek Kilimajer
Change $email_error to $mysqlerror and hopefully some error message will appear. Beauford.2005 wrote: if ($mysqlerror) { $error = $d_base_error$email_error; include(trades-input.php); exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] MySQL query problems

2003-07-16 Thread Beauford.2005
[mailto:[EMAIL PROTECTED] Sent: July 16, 2003 1:18 PM To: Beauford.2005 Cc: PHP Subject: Re: [PHP] MySQL query problems Change $email_error to $mysqlerror and hopefully some error message will appear. Beauford.2005 wrote: if ($mysqlerror) { $error

[PHP] MySQL Query

2003-06-30 Thread Pushpinder Singh Garcha
Hello , Can someone tell me what is wrong with the following querys ? I am pretty sure its got something to do with the quotes around $_POST[] variables. $sql1 = SELECT * from `admin` where `admin`.user = '$_POST['validuser']' AND `admin`.pwd = '$_POST['password']'; $sql1 = SELECT * from

RE: [PHP] MySQL Query

2003-06-30 Thread Jay Blanchard
[snip] $sql1 = SELECT * from `admin` where `admin`.user = '$_POST['validuser']' AND `admin`.pwd = '$_POST['password']'; $sql1 = SELECT * from `admin` where user = $_POST['validuser'] AND pwd = $_POST['pass']; [/snip] subtle differences $sql1 = SELECT * from `admin` where `admin`.user =

RE: [PHP] MySQL Query

2003-06-30 Thread Ford, Mike [LSS]
-Original Message- From: Pushpinder Singh Garcha [mailto:[EMAIL PROTECTED] Sent: 30 June 2003 19:10 Can someone tell me what is wrong with the following querys ? I am pretty sure its got something to do with the quotes around $_POST[] variables. $sql1 = SELECT * from `admin`

Re: [PHP] MySQL Query

2003-06-30 Thread Thorsten Körner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Am Montag, 30. Juni 2003 20:10 schrieb Pushpinder Singh Garcha: Hello , Can someone tell me what is wrong with the following querys ? I am pretty sure its got something to do with the quotes around $_POST[] variables. $sql1 = SELECT * from

Re: [PHP] MySQL Query ~~ SOLVED

2003-06-30 Thread Pushpinder Singh Garcha
Thanks to all you great ppl out there !!! have a great weekend ;-) for those in north america FYI : mine has just started ! cheers --Pushpinder On Monday, June 30, 2003, at 02:36 PM, Thorsten Körner wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Am Montag, 30. Juni 2003 20:10

[PHP] mySQL query - command LIKE OR =

2003-03-28 Thread Harry.de
Hi, i want to make a mySQL query where the result should be in $result1 any sting with a phrase of $search in $result2 any sting with the exact phrase of $search $result1 works fine, but $result2 gives out an empty sting $result1 = mysql_query(SELECT name FROM table WHERE name LIKE

RE: [PHP] mySQL query - command LIKE OR =

2003-03-28 Thread Jennifer Goodie
= does not take the wildcard (%). -Original Message- From: Harry.de [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2003 2:38 PM To: [EMAIL PROTECTED] Subject: [PHP] mySQL query - command LIKE OR = Hi, i want to make a mySQL query where the result should be in $result1 any sting

[PHP] Mysql Query Question

2003-03-18 Thread Van Andel, Robbert
I am trying to query a database looking for results that match an array of values I have set. The variable array is call group and has about 10 elements. Is there a way that I can query the database using just $group instead of having to use the following: SELECT * FROM `table` WHERE

Re: [PHP] Mysql Query Question

2003-03-18 Thread CPT John W. Holmes
$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 I am

RE: [PHP] Mysql Query Question

2003-03-18 Thread Van Andel, Robbert
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 Query Question

RE: [PHP] MySQL Query

2003-03-05 Thread John W. Holmes
Is there a way of updating a table so that I can add some sort of identifier to each field, something as simple as x=1 will do. I want to be able to modify the table so I can set a variable for each column so I can tell whether I can let a user modify that field. If I modify the fieldname

[PHP] MySQL Query

2003-03-04 Thread shaun
Hi, Is there a way of updating a table so that I can add some sort of identifier to each field, something as simple as x=1 will do. I want to be able to modify the table so I can set a variable for each column so I can tell whether I can let a user modify that field. If I modify the fieldname

[PHP] mysql query questions

2003-03-02 Thread Sunfire
i have a query: mysql_query(update members set where '$edit[company]'='$company) anyways there are 2 sources using this query.. one that needs the $edit[company] marker and another one that uses a $company marker.. any way i can make that 1 query deal with both sources? and i also

[PHP] MySQL Query Result Question

2003-02-28 Thread Van Andel, Robbert
I have the following query: $query = SELECT d.utilization, d.capacity_date, d.day, i.id, i.interface, cd.date, cd.id ; $query .= FROM (capacity_data as d LEFT JOIN interfaces as i ON d.interface = i.id) ; $query .= LEFT JOIN capacity_date as cd ON d.capacity_date=cd.id ; $query .=

RE: [PHP] MySQL Query Result Question

2003-02-28 Thread Bryan Lipscy
Shouldn't that be: while($data=mysql_fetch_array($result)) { //SSLT } NOTE: Added ) and changes $query to $result -Original Message- From: Van Andel, Robbert [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 3:21 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL Query Result

RE: [PHP] MySQL Query Result Question

2003-02-28 Thread Van Andel, Robbert
To: Van Andel, Robbert; [EMAIL PROTECTED] Subject: RE: [PHP] MySQL Query Result Question Shouldn't that be: while($data=mysql_fetch_array($result)) { //SSLT } NOTE: Added ) and changes $query to $result -Original Message- From: Van Andel, Robbert [mailto:[EMAIL PROTECTED] Sent

Re: [PHP] MySQL Query Result Question

2003-02-28 Thread Ernest E Vogelsinger
At 00:20 01.03.2003, Van Andel, Robbert said: [snip] I have the following query: $query = SELECT d.utilization, d.capacity_date, d.day, i.id, i.interface, cd.date, cd.id ; $query .= FROM (capacity_data as d LEFT JOIN interfaces as i ON d.interface =

RE: [PHP] MySQL Query Result Question

2003-02-28 Thread Van Andel, Robbert
and verified that I got nothing back. I don't know at this point. I'm at a loss. Robbert van Andel -Original Message- From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 3:51 PM To: Van Andel, Robbert Cc: [EMAIL PROTECTED] Subject: Re: [PHP] MySQL Query

RE: [PHP] MySQL Query Result Question

2003-02-28 Thread Van Andel, Robbert
Vogelsinger Cc: [EMAIL PROTECTED] Subject: RE: [PHP] MySQL Query Result Question I had the same thought and it didn't work. I have verified that $cmts[$i] is a different value then the previous iteration, but the second time through the same data as the first time through is processed. I've even run

[PHP] mysql query manipulation vs php results manipulation

2003-02-19 Thread Larry Brown
How do you determine whether or not it is faster/more efficient to run a complicated query or to run multiple simple queries and join / manipulate the results with PHP? Larry S. Brown Dimension Networks, Inc. (727) 723-8388

Re: [PHP] mysql query manipulation vs php results manipulation

2003-02-19 Thread Mark Charette
On Wed, 19 Feb 2003, Larry Brown wrote: How do you determine whether or not it is faster/more efficient to run a complicated query or to run multiple simple queries and join / manipulate the results with PHP? By empirical methods ... -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] mysql query manipulation vs php results manipulation

2003-02-19 Thread Larry Brown
My apologies for the prior html version, I forgot to change back to txt. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 On Wed, 19 Feb 2003, Larry Brown wrote: How do you determine whether or not it is faster/more efficient to run a complicated query or to run multiple simple

[PHP] MySQL Query - Not PHP Specific

2003-01-15 Thread Sean Malloy
I know this isn't a PHP question per se, but it does relate to PHP development. Every day I work with MySQL as my PHP database, I become more dissalusioned with its ability as a database server. Yes its fast, but its missing so many useful features of other DB servers. I'm digressing... Is

RE: [PHP] MySQL Query - Not PHP Specific

2003-01-15 Thread Daniel Kushner
://thehostingcompany.us -Original Message- From: Sean Malloy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 15, 2003 9:37 PM To: PHP General Subject: [PHP] MySQL Query - Not PHP Specific I know this isn't a PHP question per se, but it does relate to PHP development. Every day I work with MySQL as my PHP

RE: [PHP] MySQL Query - Not PHP Specific

2003-01-15 Thread Sean Malloy
IFNULL! thanks -Original Message- From: Daniel Kushner [mailto:[EMAIL PROTECTED]] Sent: Thursday, 16 January 2003 1:51 PM To: Sean Malloy; PHP General Subject: RE: [PHP] MySQL Query - Not PHP Specific http://www.mysql.com/documentation/mysql/bychapter/manual_Tutorial.html#Work

[PHP] PHP/MySQL Query

2002-12-15 Thread Steven M
How do i make a form that will allow me to add 2 to the value of a MySQL field? I am trying to change it from 75 to 77. Is this possible? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP/MySQL Query

2002-12-15 Thread Leif K-Brooks
mysql_query(update table set field=field+1 where whatever='whatever'); Steven M wrote: How do i make a form that will allow me to add 2 to the value of a MySQL field? I am trying to change it from 75 to 77. Is this possible? Thanks -- The above message is encrypted with double rot13

Re: [PHP] PHP/MySQL Query

2002-12-15 Thread Steven M
Leif Many thanks for that, your help is much appreciated. *smiles* Steven M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql query

2002-09-10 Thread Chris Schoeman
I use the script below to get one value out of a database: $result = mysql_query(select euro from brandstofprijzen where id=2) or die (mysql_error()); while ($row = mysql_fetch_array($result)) { $euro = $row[euro]; } mysql_free_result($result); This is working fine, but is there an easier (less

Fw: [PHP] mysql query

2002-09-10 Thread Kevin Stone
- From: Chris Schoeman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 10, 2002 10:53 AM Subject: [PHP] mysql query I use the script below to get one value out of a database: $result = mysql_query(select euro from brandstofprijzen where id=2) or die (mysql_error()); while ($row

[PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
I am getting a failed query error message. Could someone take a look and let me know. //F U N C T I O N S //= function AddSignupRequest($Signup_FName, $Signup_LName, $Signup_Address1, $Signup_Address2, $Signup_City, $Signup_State, $Signup_Zip, $Signup_Email, $Signup_Phone,

[PHP] Re: PHP/MYSQL query error

2002-08-26 Thread Chris Crane
I did some more testing and I found that I forgot the first field in the columns section of the Statement. So now it looks like this: I also copy and pasted the statement into PHPMYADMIN and it worked fine. It just doesn't work here function AddSignupRequest($Signup_FName, $Signup_LName,

RE: [PHP] PHP/MYSQL query error

2002-08-26 Thread Jay Blanchard
[snip] /* Performing SQL query */ $query = INSERT INTO SignupRequests ('FirstName', 'LastName', 'Address1', 'Address2', 'City', 'State', 'Zip', 'Email', 'Phone', 'ContactMethod', 'Date', 'IP', 'Status', 'Comments') VALUES ('', 'Chris', 'Crane', '655 Talcottville Road', 'Apt.

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
Initially there was an error with too many values verses columns. But I think it was fixed. I am double checking now. Jay Blanchard [EMAIL PROTECTED] wrote in message 003201c24d07$b8560470$8102a8c0@000347D72515">news:003201c24d07$b8560470$8102a8c0@000347D72515... [snip] /* Performing SQL

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
There are 15 columns and 15 pieces of data. In my second post I fixed this error and pasted it into PHPMYADMIN and it worked fine, but not here... Chris Crane [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Initially there was an error with too many values

<    1   2   3   4   >