Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Justin French
Why don't you do $result = mysql_query($query) or die(mysql_error()); or $result = mysql_query($query); echo mysql_error(); That way, instead of Query Failed you'll get something meaningful... probably something that will solve the problem. Justin French on 26/08/02 11:55 PM, Chris Crane

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
Thank you. I will try that. Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Why don't you do $result = mysql_query($query) or die(mysql_error()); or $result = mysql_query($query); echo mysql_error(); That way, instead of Query Failed you'll

Re: [PHP] PHP/MYSQL query error

2002-08-26 Thread Chris Crane
I got it working. It did not like the single quotes around the column names. Chris Crane [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Thank you. I will try that. Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

[PHP] MySQL query time

2002-06-26 Thread Bharath Bhushan lohray
Is there a way to find the time that mySQL took to perform a query. like the one shown when you perform it on the console mode(0.09 sec or so) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql Query time

2002-06-26 Thread Bharath Bhushan lohray
Is there a way to find the time that mySQL took to perform a query. like the one shown when you perform it on the console mode(0.09 sec or so) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] MySQL query time

2002-06-26 Thread John Holmes
Is there a way to find the time that mySQL took to perform a query. like the one shown when you perform it on the console mode(0.09 sec or so) No. You can use microtime() to get the time before and after the query, subtract smaller from larger, and that's your time. It's not the actual

Re: [PHP] MySQL Query Help!!!!

2002-06-14 Thread Mark Gallagher
Chris Kay wrote: The query does not error out it just does not give any records, and I Know What part of The query does not error out do you not understand. Why are there so many people willing to say what is wrong with a code but when it comes to A solution that go silent. I find

[PHP] MySQL Query Help!!!!

2002-06-13 Thread Chris Kay
I have a rather longer query which I would like to get all records past todays date. Here is my query $ttwo = date(YmdGi); $dbq = select(select detail.*, type.type_name, status.status_name, staff.staff_name, source.source_long, source.source_short from detail, type, status, staff, source

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Lazor, Ed
This is a MySQL question and best directed to the MySQL mailing lists available at: http://www.mysql.com/documentation/lists.html -Original Message- From: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:33 PM To: PHP General List Subject: [PHP] MySQL Query

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Lazor, Ed
; $dbq = select($sql); -Original Message- From: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 4:33 PM To: PHP General List Subject: [PHP] MySQL Query Help I have a rather longer query which I would like to get all records past todays date. Here

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread John Holmes
: Chris Kay [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 13, 2002 7:33 PM To: PHP General List Subject: [PHP] MySQL Query Help I have a rather longer query which I would like to get all records past todays date. Here is my query $ttwo = date(YmdGi); $dbq = select(select detail

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread Chris Kay
, 14 June 2002 1:26 PM To: Chris Kay; 'PHP General List' Subject: RE: [PHP] MySQL Query Help Man, where do I start. There could be so many things wrong. First of all, this is a PHP list, not MySQL. Second, use MySQL_error() after you issue a query to see if an error was returned

RE: [PHP] MySQL Query Help!!!!

2002-06-13 Thread John Holmes
On Fri, 14 Jun 2002, Chris Kay wrote: The query does not error out it just does not give any records, and I Know What part of The query does not error out do you not understand. Why are there so many people willing to say what is wrong with a code but when it comes to A solution

[PHP] Mysql Query Help needed

2002-05-16 Thread Chris Kay
I have a query select cust_fnn, cust_name, agroup_access.group_access_cust from cust, agroup_access where agroup_access.group_access_group='$id' cust.cust_fnn!=agroup_access.group_access_cust order by cust.cust_name The 2 tables are as follows agroup_access agroup_access_id

RE: [PHP] Mysql Query Help needed

2002-05-16 Thread Jay Blanchard
[snip] select cust_fnn, cust_name, agroup_access.group_access_cust from cust, agroup_access where agroup_access.group_access_group='$id' cust.cust_fnn!=agroup_access.group_access_cust order by cust.cust_name [/snip] try this (note syntactical differences); select cust_fnn, cust_name,

[PHP] MySQL query

2002-04-22 Thread Lee P Reilly
Hi, Can someone tell me if there is a way to execute multiple MySQL statements by passing *one* query containing a number of individual statements to MySQL e.g. UPDATE sampcomp SET fg=N, pctd=69, maxpctd=69.1 WHERE sampcompid=3;UPDATE sampcomp SET fg=N, pctd=69.2, maxpctd=69.3 WHERE

Re: [PHP] MySQL query

2002-04-22 Thread Tyler Longren
of mysql_query(). It's worth a shot though. Tyler Longren Captain Jack Communications www.captainjack.com [EMAIL PROTECTED] - Original Message - From: Lee P Reilly [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Monday, April 22, 2002 3:07 PM Subject: [PHP] MySQL query Hi, Can someone

[PHP] MySql query

2002-04-19 Thread Fifield, Mike
Ok this could be the wrong place to ask this but there seems to be some people in here that know mysql quite well. My question is this; I have a database that looks like this. galleries gallery_id gallery_name 1 3d 2 fractals 3 abstract 4 cats 5 cars Images image_id gallery_id

RE: [PHP] MySql query

2002-04-19 Thread Fifield, Mike
Ok the formatting got lost on that I will try this again. -Original Message- From: Fifield, Mike [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 8:57 AM To: [EMAIL PROTECTED] Subject: [PHP] MySql query Ok this could be the wrong place to ask this but there seems to be some

Re: [PHP] MySql query

2002-04-19 Thread Chris Kwasneski
Try: SELECT gallery_name, image_id, image_name FROM galleries, Images WHERE galleries.gallery_id = images.gallery_id At 07:57 AM 4/19/2002 -0700, you wrote: Ok this could be the wrong place to ask this but there seems to be some people in here that know mysql quite well. My question is this;

[PHP] PHP/MySQL Query Prob

2002-04-15 Thread Jason Soza
Hey... new to the list, but didn't have time to lurk and watch the traffic, kind of in a bind here. I apologize in advance if I do something wrong... Using this code: ?php $link = mysql_connect() or die(Could not connect);

[PHP] Re: PHP/MySQL Query Prob

2002-04-15 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hey... new to the list, but didn't have time to lurk and watch the traffic, kind of in a bind here. I apologize in advance if I do something wrong... Using this code: ?php $link = mysql_connect()

[PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
How can I tell whether anything was matched and changed after a mysql_db_query? If I'm in MySQL's console and I perform a query, it comes back and tells me something like: Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 And if something matched, 'Rows

RE: [PHP] MySQL query results

2002-03-22 Thread Rick Emery
$result = mysql_query(.)' mysql_num_rows($result) -Original Message- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 5:28 PM To: PHP-General List Subject: [PHP] MySQL query results How can I tell whether anything was matched and changed after

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Rick Emery wrote: $result = mysql_query(.)' mysql_num_rows($result) Hrm, this is resulting in: bWarning/b: Supplied argument is not a valid MySQL result resource in b./index.php/b on line b16/bbr Rows The query does get executed, and the record does get changed. The code

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
After a bit of research: -- Rick Emery wrote: $result = mysql_query(.)' mysql_num_rows($result) Hrm, this is resulting in: bWarning/b: Supplied argument is not a valid MySQL result resource in b./index.php/b on line b16/bbr Rows -- Rightfully so.

Re: [PHP] MySQL query results

2002-03-22 Thread Chris
On 22 Mar 2002 at 16:41, Ashley M. Kirchner wrote: Rick Emery wrote: The query does get executed, and the record does get changed. The code looks like this: $conn = @MYSQL_CONNECT($host,$user,$password) ; mysql_select_db($database, $conn); $query = UPDATE clients SET

Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf
http://www.php.net/manual/en/function.mysql-affected-rows.php On Fri, 22 Mar 2002, Ashley M. Kirchner wrote: After a bit of research: -- Rick Emery wrote: $result = mysql_query(.)' mysql_num_rows($result) Hrm, this is resulting in: bWarning/b: Supplied

Re: [PHP] MySQL query results

2002-03-22 Thread Chris
oops. i see then my previous mail will not help in this case. wasn't there something called 'affected_rows'? search the online manual for 'affected'. On 22 Mar 2002 at 17:09, Ashley M. Kirchner wrote: After a bit of research: -- Rick Emery wrote: $result =

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Rasmus Lerdorf wrote: http://www.php.net/manual/en/function.mysql-affected-rows.php Thanks Rasmus. I did try that as well, same result. If I don't bother with the $result, everything's fine. Like I said, the query runs, and gets executed. The DB field gets changed as it should and all.

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Chris wrote: The query does get executed, and the record does get changed. seems there is something wrong with the query, can you either echo the query and feed it directly to mysql, (e.g. in phpmyadmin) see what happens? Nope, the query's fine. I can run it manually, and through

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Chris wrote: oops. i see then my previous mail will not help in this case. wasn't there something called 'affected_rows'? search the online manual for 'affected'. I did. Read my reply to Rasmus as well. :) At this rate, I may just say to heck with the $result, and always assume

Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf
But did you read the documentation? It states: int mysql_affected_rows ( [resource link_identifier]) That's an optional link identifier. You don't feed it a result resource. Just call it without any arguments. The affected rows is tied to a database connection, not a result set. -Rasmus On

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Rasmus Lerdorf wrote: But did you read the documentation? It states: Yes. But, reading it, and my brain actually registering what I was reading, now that's a different story. :) It _is_ Friday after all. Thanks! -- H | Life is the art of drawing without an eraser. - John Gardner

Re: [PHP] MySQL query results

2002-03-22 Thread Justin French
FWIW, straight from my code, with a few snips: ? $sql = SELECT * FROM news ORDER BY id DESC LIMIT $limit; $result = @mysql_query($sql); print mysql_error(); if (!$result) { echo No database found.; } elseif(mysql_num_rows($result) == 0) { echo No records found.; } else {

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Justin French wrote: $sql = SELECT * FROM news ORDER BY id DESC LIMIT $limit; You're forgetting (or just didn't read my code), I'm UPDATE-ing, not SELECT-ing. mysql_num_rows() doesn't work on UPDATE. Anyway, thanks to Rasmus for pointing out my error. -- H | Life is the art of

[PHP] MySQL Query

2002-03-04 Thread Jason Whitaker
OK, I need to know is there a place where i can find out how to pull information(TEXT) from a MySQL DB table and print where i place a variable in a php page? -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp

Re: [PHP] MySQL Query

2002-03-04 Thread Erik Price
On Monday, March 4, 2002, at 02:26 PM, Jason Whitaker wrote: OK, I need to know is there a place where i can find out how to pull information(TEXT) from a MySQL DB table and print where i place a variable in a php page? This tutorial was my introduction to the concept, but you can find

RE: [PHP] MySQL Query

2002-03-04 Thread Matt Schroebel
This tutorial was my introduction to the concept, but you can find this information in a hundred other places: http://hotwiredlycoscom/webmonkey/programming/php/tutorials/tutorial4html I'd recommend that tutorial only as a guideline for using mySQL and php Don't try to use the

Re: [PHP] MySQL Query

2002-03-04 Thread Erik Price
On Monday, March 4, 2002, at 03:29 PM, Matt Schroebel wrote: I'd recommend that tutorial only as a guideline for using mySQL and php. Don't try to use the obfuscated logic in the final example as a good way to code an add/change/delete page. It's much easier if there are radio buttons

RE: [PHP] MySQL Query

2002-03-04 Thread Matt Schroebel
I don't really remember the tutorial very well I thought it did a fine job of explaining some of the basics I spent a few hours with it and felt pretty good However, I agree that it's not a good intro to PHP's basic features I stumbled on php a few years ago, and that was my intro

Re: [PHP] MySQL Query

2002-03-04 Thread George Whiffen
Erik Price wrote: I haven't seen yet a tutorial that teaches coding from the perspective of using register_globals off, which I think is pretty important (personal opinion) It's not that hard to pick up, though, once you've gotten started Still, I think it makes alot more sense to do so

[PHP] MySQL query question

2002-01-24 Thread Phil Schwarzmann
Okay, so when I INSERT a row of information into a MySQL database, I don't want it to place it at the first empty row it findsI want it to put it after the very last exsisting row. One of the fields of the database is an AUTO_INCREMENT type, so Im assuming Im gonna use that in the query.

Re: [PHP] MySQL query question

2002-01-24 Thread Erik Price
If you are using a table with AUTO_INCREMENT set for one of the fields, the default is for MySQL to assign any new row an AUTO_INCREMENT value that is one higher than the currently highest value in that column. In other words, MySQL by default does exactly what you say you are trying to do.

Re: [PHP] MySQL query question

2002-01-24 Thread Matt
] Subject: [PHP] MySQL query question Okay, so when I INSERT a row of information into a MySQL database, I don't want it to place it at the first empty row it findsI want it to put it after the very last exsisting row. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail

[PHP] MySQL query problem!

2001-11-22 Thread De Necker Henri
I have the following query $query = INSERT INTO acl ( username, password ) VALUES ( 'henri', ENCRYPT('diesel','henri') ); This is the error i get : Column 'password' cannot be null What is wrong with my query? -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] MySQL query problem!

2001-11-22 Thread David Robley
On Fri, 23 Nov 2001 16:17, De Necker Henri wrote: I have the following query $query = INSERT INTO acl ( username, password ) VALUES ( 'henri', ENCRYPT('diesel','henri') ); This is the error i get : Column 'password' cannot be null What is wrong with my query?

RE: [PHP] MySQL query problem!

2001-11-22 Thread De Necker Henri
On waht systems does encrypt() work on.In my Mysql client my query results are null,so i dont have encrypt on my system! -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: 23 November 2001 08:24 To: De Necker Henri; PHP-General (E-mail) Subject: Re: [PHP] MySQL query

Re: [PHP] MySQL query problem!

2001-11-22 Thread David Robley
On Fri, 23 Nov 2001 17:05, De Necker Henri wrote: -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: 23 November 2001 08:24 To: De Necker Henri; PHP-General (E-mail) Subject: Re: [PHP] MySQL query problem! On Fri, 23 Nov 2001 16:17, De Necker Henri wrote: I

[PHP] MySQL query

2001-10-18 Thread Srinivasan Ramakrishnan
Hi all, I'm looking at the following scenario: I have MySQL two tables with usernames in both of them, I need to get usernames(A) - usernames(B) In Oracle I would use: SELECT username FROM user MINUS SELECT username FROM task_assignment Since MySQL does not support MINUS, I tried using the

RE: [PHP] MySQL query

2001-10-18 Thread Dave Watkinson
] Subject: [PHP] MySQL query Hi all, I'm looking at the following scenario: I have MySQL two tables with usernames in both of them, I need to get usernames(A) - usernames(B) In Oracle I would use: SELECT username FROM user MINUS SELECT username FROM task_assignment Since MySQL does not support MINUS

[PHP] mysql query for current id-1

2001-10-01 Thread Jason Dulberg
This is kindof a weird question so bear with me as I try to explain. I have a session table that gets updated when a user logs in/out. If they don't logout, some info is left unchanged. I have a cron script that takes care of the stray sessions so that's all good. In the sessions table, there's

RE: [PHP] mysql query for current id-1

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)
[mailto:[EMAIL PROTECTED]] Sent: martedì 2 ottobre 2001 6.04 To: [EMAIL PROTECTED] Subject: [PHP] mysql query for current id-1 This is kindof a weird question so bear with me as I try to explain. I have a session table that gets updated when a user logs in/out. If they don't logout, some info

Re: [PHP] mysql query for current id-1

2001-10-01 Thread Mukul Sabharwal
Hi, The reason probably is that you're limiting from the 2nd row, instead of the first, 0 is the row starting point (I think). So : $sql=select id,agent,host, DATE_FORMAT(time_in, '%M %d, %Y, %l:%i') AS unixdate from logged_in WHERE userid='$current_user' ORDER BY id DESC LIMIT 0, 1; =

RE: [PHP] mysql query for current id-1

2001-10-01 Thread Jason Dulberg
) [mailto:[EMAIL PROTECTED]] Sent: October 2, 2001 12:14 AM To: 'Jason Dulberg'; [EMAIL PROTECTED] Subject: RE: [PHP] mysql query for current id-1 What about this: $sql=select id,agent,host, DATE_FORMAT(time_in, '%M %d, %Y, %l:%i') AS unixdate from logged_in WHERE userid='$current_user' ORDER

RE: [PHP] mysql query for current id-1

2001-10-01 Thread Maxim Maletsky \(PHPBeginner.com\)
] Subject: RE: [PHP] mysql query for current id-1 Thank you for your lightning fast response!! I tried your query but it appears to be coming up with the current id rather than the users last login. __ Jason Dulberg Extreme MTB http://extreme.nas.net -Original Message- From

RE: [PHP] mysql query for current id-1

2001-10-01 Thread Jason Dulberg
: RE: [PHP] mysql query for current id-1 ... DESC LIMIT 1,1 As you wrote yourself. Sorry, haven't taken in consideration ;-) Maxim Maletsky www.PHPBeginner.com -Original Message- From: Jason Dulberg [mailto:[EMAIL PROTECTED]] Sent: martedì 2 ottobre 2001 6.59 To: Maxim

[PHP] MySQL query error

2001-09-17 Thread Niklas Lampén
Code: ? $Query = UPDATE feRegUsers SET Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17' WHERE ID LIKE '288'; mysql_quory($Query); print mysql_error(); ? That results You have an error in your SQL syntax near 'Constructor='2001-09-17', Enertec='2001-09-17', Seatec='2001-09-17''

Re: [PHP] MySQL query help

2001-09-11 Thread Michael George
On Mon, Sep 10, 2001 at 03:59:36PM -0500, Sheridan Saint-Michel wrote: Well, I played with this a little more and it seems to be acting oddly when you first call this select unless you set the variable first. So if the below doesn't work try actually doing this $query=set @count=NULL;

[PHP] MySQL query help

2001-09-10 Thread Michael George
I'm trying to make a query that will number it's own output rows. e.g. when listing all the entries in a table that are related to a specific invoice, there will be a column with a monotonically increasing integer value (1-x where x is the number of matching entries). I know I can easily do

Re: [PHP] MySQL query help

2001-09-10 Thread Sheridan Saint-Michel
: set @count=Null; between the selects =P Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: Michael George [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 10, 2001 2:20 PM Subject: [PHP] MySQL query help I'm

Re: [PHP] MySQL query help

2001-09-10 Thread Sheridan Saint-Michel
www.foxjet.com - Original Message - From: Sheridan Saint-Michel [EMAIL PROTECTED] To: Michael George [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, September 10, 2001 3:29 PM Subject: Re: [PHP] MySQL query help See if this does what you are shooting for: select tableName.*,if(@count=1

[PHP] mysql query . need help!!!!!

2001-09-04 Thread lizlynch
i have two tables here, i want to insert the customername from the Username table and insert it into the Classification table. is the below query correct cause i can't seem to get it to work. $query = INSERT INTO Classification (Customername) (SELECT Customername) FROM Username WHERE

[PHP] MySQL query length

2001-08-28 Thread Niklas Lampén
Can it cause any problems if mySQL query is very long? I have to compare many words to many fields in my DB and I've done it like Field LIKE '%searchword%' || Field LIKE '%searchword%' || Field LIKE '%searchword%'.. Query is build by a function, so I don't know the exact length but it is

RE: [PHP] MySQL query length

2001-08-28 Thread Kees Hoekzema
]] Sent: Tuesday, August 28, 2001 8:51 AM To: Php-General Subject: [PHP] MySQL query length Can it cause any problems if mySQL query is very long? I have to compare many words to many fields in my DB and I've done it like Field LIKE '%searchword%' || Field LIKE '%searchword%' || Field

[PHP] PHP/mySQL query problem...

2001-08-27 Thread Jeff Lewis
Guys, why isn't this working? :) SELECT * FROM links WHERE name LIKE %te% OR description LIKE %te% OR url LIKE %te% AND approved=1 LIMIT 5 I am using a PHP script to add items to the database and a small search file to grab them. Thing is, I want the above to grab ONLY ones that have

Re: [PHP] PHP/mySQL query problem...

2001-08-27 Thread ERISEN, Mehmet Kamil
Yes, there is a problem. -- SELECT * FROM links WHERE 1=1 and ( name LIKE %te% OR description LIKE %te% OR url LIKE %te% ) AND approved=1 LIMIT 5; -- --- Jeff Lewis [EMAIL PROTECTED] wrote: Guys, why isn't this working? :) SELECT * FROM links WHERE name LIKE %te% OR description LIKE

[PHP] mySQL Query - comparing multiple values with one field

2001-08-22 Thread Niklas Lampén
What I need to do is to compare if one field matches a value from a huge list of values. Do I need to query like SELECT * FROM table WHERE field LIKE '%value1%' || field LIKE '%value2%' or can I do it something like this SELECT * FROM table WHERE field LIKE ('%value1%' || '%value2%')? Niklas

[PHP] mySQL query grief

2001-07-22 Thread Justin French
Hi all, newbie to MySQL... I get this error: Supplied argument is not a valid MySQL result resource in /usr/local/ blah blah blah From this query: $username = juddy2; $sql = SELECT * FROM staff WHERE id=.$username; $result = mysql_query($sql); However, this works okay: $username = juddy2;

Re: [PHP] mySQL query grief

2001-07-22 Thread Gianluca Baldo
Justin - there's an error in your query. I think it should be: $sql = SELECT * FROM staff WHERE id='$username'; Anyway, to see which is the problem just ? print mysql_error(); ? after $result = mysql_query($sql); HTH Gianluca JF newbie to MySQL... JF I get this error: JF Supplied

Re: [PHP] MySQL Query

2001-07-19 Thread Ryan Fischer
You wrote: I have a table that looks like Name | Type | X | Y Foo| Ship | 9 | 29 Bar| Base | 9 | 29 Is there any way I can write a query that selects everything with Type = Base, and X and Y = Foo's X and Y? ie Select * from table where type = Base and X = {Foo:X} and Y =

Re: [PHP] MySQL Query - SOLVED

2001-07-19 Thread Sheridan Saint-Michel
Thanks! That's exactly what I was looking for = 3 ) - Original Message - From: Morten Winkler Jørgensen [EMAIL PROTECTED] To: Sheridan Saint-Michel [EMAIL PROTECTED] Sent: Thursday, July 19, 2001 2:56 AM Subject: Re: [PHP] MySQL Query Hi Sheridan, You wrote: SSM I have a table

[PHP] PHP/mySQL Query....

2001-07-19 Thread Jeff Lewis
Ok, using PHP and mySQL have two tables that look something like this; Table 1 (users): userID location Table 2 (resumes): resumeID userID I am trying to form a query to pull all the locations and list them on the page. While I could only just select from the users one I do want to be able

RE: [PHP] PHP/mySQL Query....

2001-07-19 Thread King, Justin
: [PHP] PHP/mySQL Query Ok, using PHP and mySQL have two tables that look something like this; Table 1 (users): userID location Table 2 (resumes): resumeID userID I am trying to form a query to pull all the locations and list them on the page. While I could only just select from the users one I

Re: [PHP] PHP/mySQL Query....

2001-07-19 Thread Jeff Lewis
Yes but for the first query all I want to do is list the locations and not multiple times Jeff - Original Message - From: King, Justin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 19, 2001 1:46 PM Subject: RE: [PHP] PHP/mySQL Query I'm assuming you're trying

RE: [PHP] PHP/mySQL Query....

2001-07-19 Thread King, Justin
Whoops.. do SELECT DISTINCT -Justin -Original Message- From: Jeff Lewis [EMAIL PROTECTED] Sent: Thursday, July 19, 2001 1:08 PM To: King, Justin; [EMAIL PROTECTED] Subject: Re: [PHP] PHP/mySQL Query Yes but for the first query all I want to do is list the locations

Re: [PHP] MySQL Query

2001-07-19 Thread Marcus Hartmann
the statement should look like this: $result = mysql_query(select * from table where type = 'Base' and x = 'x' and y = 'y'); Ryan Fischer [EMAIL PROTECTED] wrote in message 01d901c1101e$9cd43220$80c93fd0@ryan">news:01d901c1101e$9cd43220$80c93fd0@ryan... You wrote: I have a table that looks

Re: [PHP] MySQL Query

2001-07-19 Thread Ryan Fischer
You wrote: Ryan Fischer [EMAIL PROTECTED] wrote in message 01d901c1101e$9cd43220$80c93fd0@ryan">news:01d901c1101e$9cd43220$80c93fd0@ryan... You wrote: I have a table that looks like Name | Type | X | Y Foo| Ship | 9 | 29 Bar| Base | 9 | 29 Is there any way I can write a

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

2001-07-19 Thread Deependra B. Tandukar
: Thursday, July 19, 2001 09:25 Subject: Re: [PHP] MySQL Query. Thanks but it is not working! My problem goes like this: Frankly speaking I am trying to make web based accounting package for my organization. I have talbes: Voucher Sales Cash Bank Income Expenses, etc. All

[PHP] MySQL Query

2001-07-18 Thread Sheridan Saint-Michel
I have a table that looks like Name | Type | X | Y Foo| Ship | 9 | 29 Bar| Base | 9 | 29 Is there any way I can write a query that selects everything with Type = Base, and X and Y = Foo's X and Y? ie Select * from table where type = Base and X = {Foo:X} and Y = {Foo:Y}; Anyway,

[PHP] MySQL Query.....

2001-07-17 Thread Deependra B. Tandukar
Greetings ! I have following tables in MySQL: TableItem idlist 1 Banana 2 Orange 3 Mango Other tables are: Banana, Orange, Mango Instead of selecting Table Banana directly I need to select it as select $TableItem.list where id=1 or something like that for editing or deleting

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

2001-07-17 Thread py_sympatico
Try, select '$TableItem'.list where id = 1; py - Original Message - From: Deependra B. Tandukar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 12:14 AM Subject: [PHP] MySQL Query. Greetings ! I have following tables in MySQL: TableItem idlist 1

Re: [PHP] Missing first record in PHP/Mysql query

2001-07-06 Thread Chris Anderson
:11 PM Subject: [PHP] Missing first record in PHP/Mysql query Excuse me if this is too newbie...but I'm writing a simple script to query a database and loop through the reuslts, echoing them on the page. When I enter the query at the mysql command line, I get the correct results. But the same

[PHP] Missing first record in PHP/Mysql query

2001-07-05 Thread Rory O'Connor
Excuse me if this is too newbie...but I'm writing a simple script to query a database and loop through the reuslts, echoing them on the page. When I enter the query at the mysql command line, I get the correct results. But the same query run through PHP renders all results except the first one.

Re: [PHP] Missing first record in PHP/Mysql query

2001-07-05 Thread Steve Edberg
At 7:11 PM -0700 7/5/01, Rory O'Connor wrote: Excuse me if this is too newbie...but I'm writing a simple script to query a database and loop through the reuslts, echoing them on the page. When I enter the query at the mysql command line, I get the correct results. But the same query run

[PHP] PHP/mySQL Query

2001-07-05 Thread Jeff Lewis
I fought the urge to post this here but have to :( I have two tables named like this: owners -ownerID -teamname -more fields teampages -ownerID -bio Anyway, I'm doing a select on the database like this: select ownerID, last_update FROM teampages ORDER BY last_update DESC LIMIT 10 The thing

Re: [PHP] PHP/mySQL Query

2001-07-05 Thread Jay Paulson
Message - From: Jeff Lewis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 6:59 PM Subject: [PHP] PHP/mySQL Query I fought the urge to post this here but have to :( I have two tables named like this: owners -ownerID -teamname -more fields teampages -ownerID -bio

Re: [PHP] PHP/mySQL Query

2001-07-05 Thread Duncan Hill
On Thu, 5 Jul 2001, Jeff Lewis wrote: owners -ownerID -teamname -more fields teampages -ownerID -bio Anyway, I'm doing a select on the database like this: select ownerID, last_update FROM teampages ORDER BY last_update DESC LIMIT 10 The thing is, I want to get the team name from the

RE: [PHP] PHP/mySQL Query

2001-07-05 Thread Chadwick, Russell
SELECT t.ownerID, t.last_update, o.teamname FROM teampages t, owners o WHERE t.ownerID = o.ownerID ORDER BY t.last_update DESC LIMIT 10 -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 5:00 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP/mySQL

Re: [PHP] PHP/mySQL Query

2001-07-05 Thread Steve Werby
Jeff Lewis [EMAIL PROTECTED] wrote: I fought the urge to post this here but have to :( owners -ownerID -teamname -more fields teampages -ownerID -bio Anyway, I'm doing a select on the database like this: select ownerID, last_update FROM teampages ORDER BY last_update DESC LIMIT 10

RE: [PHP] PHP Mysql query data conversion newbie

2001-05-10 Thread Don Read
On 09-May-01 Jon Haworth wrote: snip be sure to check for the NULL : if (isset($amyrow[date])) { if ($amyrow[date] == -00-00 00:00:00) { echo no date; } else { echo $amyrow[date]; } } else {

[PHP] PHP Mysql query data conversion newbie

2001-05-09 Thread Andras Kende
Hello, I pull some data from mysql with the php code below. On the date field if there is no date on mysql it displays : -00-00 00:00:00 I would like to change this -00-00 00:00:00 to no date for example.. Or if the cel is empty to (because otherwise the tableborders are messed up)

RE: [PHP] PHP Mysql query data conversion newbie

2001-05-09 Thread Jon Haworth
[date]; } echo /td; } } HTH Jon -Original Message- From: Andras Kende [mailto:[EMAIL PROTECTED]] Sent: 28 April 2001 17:01 To: [EMAIL PROTECTED] Subject: [PHP] PHP Mysql query data conversion newbie Hello, I pull some data from mysql with the php code

Re: [PHP] PHP Mysql query data conversion newbie

2001-05-09 Thread bill
On Sat, 28 Apr 2001, Andras Kende wrote: Hello, I pull some data from mysql with the php code below. On the date field if there is no date on mysql it displays : -00-00 00:00:00 I would like to change this -00-00 00:00:00 to no date for example.. hmm... mysql can do this, works

[PHP] MySQL Query Question

2001-04-15 Thread Jeff Holzfaster
Hi, I have a couple questions... first, is there a notable MySQL General List like this one? Second, how do you write this query properly, or can it be done? select concat(date_format(date, "%W, %e %M %Y")," ",time) as date from TABLE order by date DESC; Thanks! Jeff -- PHP General Mailing

Re: [PHP] MySQL Query Question

2001-04-15 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Jeff Holzfaster") wrote: I have a couple questions... first, is there a notable MySQL General List like this one? Yes. The list on mysql.com is quite active and, like this one, it's common to get responses directly from one of the

RE: [PHP] MySQL Query Question

2001-04-15 Thread Jeff Holzfaster
The MySQL manual has a chapter on date/time factions. Or is it the 'order by' clause that's giving you trouble...? I assume that 'date' is a reserved word, so it may be confusing mysql. In which case, try using a different alias, like 'f_date". This works: select date_format(date,

Re: [PHP] MySQL Query Question

2001-04-15 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Jeff Holzfaster") wrote: This works: select date_format(date, "%W, %e %M %Y") as date from table This doesn't: select concat(date_format(date, "%W, %e %M %Y")," ",time) as time_of_day I'm wondering if it is possible to use concat in this

[PHP] MySQL Query Error

2001-01-21 Thread Matt Stone
Hi, I have a MySQL statement, namely: SELECT COUNT(*) AS Count FROM images i LEFT JOIN categories c ON i.cat_id=c.id LEFT JOIN subcategories s ON i.subcat_id=s.id I want to change the LEFT JOINs to INNER JOINs like so: SELECT COUNT(*) AS Count FROM images i INNER JOIN categories c ON

RE: [PHP] MySQL Query Error

2001-01-21 Thread Matt Stone
No, that is exactly as the PHPLib Debug function is returning... :| -Original Message- From: Samantha Savvakis [mailto:[EMAIL PROTECTED]] Sent: Monday, 22 January 2001 3:21 PM To: Matt Stone Subject: RE: [PHP] MySQL Query Error I'm not sure why are getting that error. Is the statement

<    1   2   3   4   >