[PHP-DB] Re: Select on Group

2015-11-17 Thread B. Aerts
On 17/11/15 01:02, Karl DeSaulniers wrote: Hello All, Hoping someone can help me with this query. I want to select some custom fields from my database that are part of a group of custom fields. There are several of these groups. I want to (in one sql statement) grab these fields, all of them

Re: [PHP-DB] Re: SELECT

2011-10-20 Thread tamouse mailing lists
On Mon, Oct 17, 2011 at 12:58 PM, Jim Giner jim.gi...@albanyhandball.com wrote: I would do it this way: Where  $sel_d = (the day # you want)  $sel_m = (the month # you want) The where clause would be: Where  (start_month = $sel_m and start_day = $sel_d) and     (end_month = $sel_m and

[PHP-DB] Re: SELECT

2011-10-17 Thread Jim Giner
I would do it this way: Where $sel_d = (the day # you want) $sel_m = (the month # you want) The where clause would be: Where (start_month = $sel_m and start_day = $sel_d) and (end_month = $sel_m and end_day = $sel_d) Someone else will probably have something more elegant, but I

RE: [PHP-DB] Re: SELECT

2011-10-17 Thread Toby Hart Dyke
Though the operators are = and =, not = and =. Toby -Original Message- From: Jim Giner [mailto:jim.gi...@albanyhandball.com] Sent: Monday, October 17, 2011 1:58 PM To: php-db@lists.php.net Subject: [PHP-DB] Re: SELECT I would do it this way: Where $sel_d = (the day # you want

[PHP-DB] RE: SELECT WHERE length of content question

2011-03-11 Thread Geoffrey Pitman
You should be able to use the MySQL command LENGTH() command. I'm assuming that your fax field is a varchar or char(10) field. If it's a number (which it probably shouldn't be), I suppose you could write a query to find values equal to or greater than 100,000,000,000.

Re: [PHP-DB] RE: SELECT WHERE length of content question

2011-03-11 Thread Constantin Brinzoi
Do not forget to use TRIM function as well: LENGTH(TRIM(fax)) in order to elliminate leading and trailing spaces. Aurel - Original Message - From: Geoffrey Pitman geoffrey.pit...@gmail.com To: php-db@lists.php.net Sent: Friday, March 11, 2011 7:59 PM Subject: [PHP-DB] RE: SELECT

[PHP-DB] Re: SELECT query

2008-12-21 Thread Ron Piggott
One more thing ... Bible is stored by verses, t is the text of the verse On Sun, 2008-12-21 at 19:52 -0500, Ron Piggott wrote: I am working on a web based Bible searching query. So far I am able to generate: SELECT * FROM `bible_verses` INNER JOIN `bible_books` ON `bible_books`.`id` =

Re: [PHP-DB] Re: SELECT query

2008-12-21 Thread Bastien Koert
On Sun, Dec 21, 2008 at 7:56 PM, Ron Piggott ron.pigg...@actsministries.org wrote: One more thing ... Bible is stored by verses, t is the text of the verse On Sun, 2008-12-21 at 19:52 -0500, Ron Piggott wrote: I am working on a web based Bible searching query. So far I am able to

Re: [PHP-DB] Re: SELECT query

2008-12-21 Thread Chris
Bastien Koert wrote: On Sun, Dec 21, 2008 at 7:56 PM, Ron Piggott ron.pigg...@actsministries.org wrote: One more thing ... Bible is stored by verses, t is the text of the verse On Sun, 2008-12-21 at 19:52 -0500, Ron Piggott wrote: I am working on a web based Bible searching query. So far

[PHP-DB] Re: SELECT

2006-01-20 Thread David Robley
Ron Piggott (PHP wrote: Yesterday I asked how to get the date time 90 minutes ago and I received several responses. Thanks. I don't think this select statement is working correctly. (Correctly being what I am intending it to do) I took a look at the table this morning. One record

[PHP-DB] Re: SELECT

2005-12-11 Thread Frank Flynn
Ron You want SELECT DISTINCT ... or SELECT column list FROM table GROUP BY column list In either case you probably can't use SELECT * - you have to specify the columns you're after. This is because these commands will look for any differences and if they see one they'll give you a new

[PHP-DB] Re: SELECT html table

2005-12-05 Thread El Bekko
Ron Piggott (PHP) wrote: I would like to display the contents of my table with the first row being grey in background and the next row being white and the third row being grey, fourth being white, etc. I am not sure how to do this. Well, that's pretty easy to do actually :P You have your

[PHP-DB] Re: SELECT html table

2005-12-04 Thread JeRRy
From: Ron Piggott (PHP) [EMAIL PROTECTED]To: PHP DB php-db@lists.php.netDate: Sun, 04 Dec 2005 13:38:58 -0500Subject: SELECT html table I have two questions. I would like to display the contents of my table with the first row being grey in background and the

[Fwd: Re: [PHP-DB] Re: SELECT html table]

2005-12-04 Thread Shahmat Dahlan
-- Best Regards, Shahmat Dahlan Research and Development SAINS Mobile: +(60)16 882 6130 Office: +(60)82 426 733 ext 5512 ---BeginMessage--- (1) i've been using this method for years now, maybe somebody else has a better way to do this? ? sql query $i = 0; while (sql result fetches) { if

RE: [PHP-DB] Re: Select

2005-05-18 Thread David Robley
Message- From: David Robley [mailto:[EMAIL PROTECTED] Sent: Martes, 17 de Mayo de 2005 03:42 p.m. To: php-db@lists.php.net Subject: [PHP-DB] Re: Select Miguel Antonio Guirao Aguilar wrote: Hi!! I have this query in PHP: $items2 = mysql_query(SELECT DISTINCT * FROM rev ORDER BY rev

[PHP-DB] Re: Select

2005-05-17 Thread David Robley
Miguel Antonio Guirao Aguilar wrote: Hi!! I have this query in PHP: $items2 = mysql_query(SELECT DISTINCT * FROM rev ORDER BY rev, $link); I have three rows with the same data on it, and DISTINCT seems to be not working, since I got all the rows, any ideas of what is going wrong?

[PHP-DB] RE: select inside a while loop

2003-11-29 Thread Rolf van de Krol
Hello, Your code looks well. But is the variable $db the name of your database or your link-identifier. When it is the name of your database i'm not really surpised your code wouldn't work. mysql_query requires as second argument a link identifier. Rolf van de Krol -Oorspronkelijk

Re: [PHP-DB] RE: select inside a while loop

2003-11-29 Thread Martin Marques
Sorry, just say the message. Your code looks well. But is the variable $db the name of your database or your link-identifier. When it is the name of your database i'm not really surpised your code wouldn't work. mysql_query requires as second argument a link identifier. Read what Rolf says.

[PHP-DB] Re: SELECT FROM 2 or more tables

2003-08-20 Thread John Ryan
ive heard that before, and its in the mysql manual, to have something like WHERE table1.id = table2.id But does make any sense to me. What Im doing is providing a search form for customers that allows them to search each individual table for content or all tables. all tables have a common field,

[PHP-DB] Re: select from multi tables

2003-02-03 Thread Bastian Vogt
SELECT SUM(T1.F1) AS C1, SUM(T2.F1) AS C2 FROM T1, T2 Hi, T1,T2 is a join of the two tables which means that you combine each value of T1 with each value of T2. This is why you don't get the result you want. In your case I simply would do two querys as it won't make any problems: SELECT SUM

RE: [PHP-DB] Re: select from multi tables

2003-02-03 Thread Griffiths, Daniel
statement or again will I need to use multiple statments and add up the results with php? thanks again -Original Message- From: Bastian Vogt [mailto:[EMAIL PROTECTED]] Sent: 03 February 2003 13:12 To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: select from multi tables SELECT SUM(T1.F1

[PHP-DB] Re: SELECT problem

2003-01-16 Thread Foong
try put the following line right after you call mysql_query(): echo mysql_error(); see what's the error. Foong Sabina A. Schneider [EMAIL PROTECTED] wrote in message 001001c2bde8$de3c95d0$489346c8@mansa">news:001001c2bde8$de3c95d0$489346c8@mansa... Hello PHP world!!! i've just finisched

[PHP-DB] Re: select date YYYY-MM mysql help

2003-01-03 Thread Max Clark
Thanks everyone for their help! Peter Goggin [EMAIL PROTECTED] wrote in message 008f01c2b32a$b50b2500$0301a8c0@petergoggin">news:008f01c2b32a$b50b2500$0301a8c0@petergoggin... If mysql has a between function then you could try: where date between '2002-12-01'and '2002-12-31'. Otherwise try

RE: [PHP-DB] Re: select date YYYY-MM mysql help

2003-01-03 Thread Matthew Moldvan
/ --- -Original Message- From: Max Clark [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 3:02 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: select date -MM mysql help Thanks everyone for their help! Peter Goggin [EMAIL PROTECTED] wrote in message 008f01c2b32a$b50b2500$0301a8c0

RE: [PHP-DB] Re: select date YYYY-MM mysql help

2003-01-03 Thread Matthew Moldvan
/ecommerce/ --- -Original Message- From: Max Clark [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 3:35 PM To: 'Matthew Moldvan'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Re: select date -MM mysql help I ended up using: SELECT * FROM table

[PHP-DB] Re: select only where 2 things are true

2002-12-13 Thread rolf vreijdenberger
SELECT jouw_id FROM A AS A1, A AS A2 WHERE A1.merkid=1 AND A2.merk_id=2 AND A1.jouw_id=A2.jouw_id this is a self join! thanks to vincent @ www.yapf.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Re: select distinct with all columns

2002-08-13 Thread russ arbuthnot
Perfect! Thanks. I'm still trying to get a handle on the GROUP BY command. It's still a little bit like magic to me. And in the manual, they don't really show how to use it like the way I wanted to use it. Thanks again, russ On Monday 12 August 2002 01:27 pm, Dan Koken wrote: SELECT * FROM

[PHP-DB] Re: select distinct with all columns

2002-08-12 Thread Dan Koken
SELECT * FROM equipement WHERE class = microphones GROUP BY type; Russ Arbuthnot wrote: I have a mysql table named equipment with 11 columns named: id, staff_member, class, type, manufacturer, model, description, picture, created, modified, and published. I'm trying to write a select

[PHP-DB] Re: Select * from t1.id where not equal to t2.id ???

2002-08-03 Thread Dan Koken
Dave, Try something like this: SELECT * FROM t1 LEFT JOIN t2 ON t2.id = t1.id WHERE t2.id is NULL HTH. Dan. Dave Carrera wrote: High all I cant seem to get this sql working. I am trying to pull everything from table 1 (t1) where t1.id is not equal to table 2 (t2) id I cant

[PHP-DB] Re: Select string.

2002-07-11 Thread Jason Morehouse
Single quotes within the select work fine. $login = mysql_query(SELECT * FROM Users WHERE Username = '$User_Name'); On Thu, 11 Jul 2002 06:47:54 +1200, Shiloh Madsen wrote: Yet another thing i need some quick help with. What is the proper way to generate a select string in php. I know if

[PHP-DB] Re: SELECT giving too much :)

2001-08-30 Thread Steve Brett
SELECT distinct(students.fname), courses.title AS course FROM students, courses, course_enrolments, groups, locations, staff WHERE (students.studentID=course_enrolments.studentID AND course_enrolments.courseID=courses.courseID) AND (students.groupID=groups.groupID) AND

[PHP-DB] Re: Select Inner Join Question

2001-08-06 Thread Hugh Bothwell
Steve Fitzgerald [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm trying to display a summary list of calls with one attribute being CallType. I have CallType and CallTypeID defined in a table name calltypes. The problem I am having is taking the output of

[PHP-DB] Re: Select just the first two letters in a column (MySQL)

2001-03-08 Thread Rod Buchanan
On Thu, 8 Mar 2001 08:47:41 -0600, John Guynn wrote: Is there a way to select just the first two letters in a column? I have a column that contains values like TT1, TT2, TT3, TT4, PR1, PR2, RD1, RD2, RD3, and I'd like to SELECT DISTINCT the first two letters. In otherwords have the select