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
a
On Mon, Oct 17, 2011 at 12:58 PM, Jim Giner
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 end_day =< $sel_
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 da
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
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"
To:
Sent: Friday, March 11, 2011 7:59 PM
Subject: [PHP-DB] RE: SELECT WHERE length of content question
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.
http://dev.mysql.com/doc/refm
Bastien Koert wrote:
On Sun, Dec 21, 2008 at 7:56 PM, Ron Piggott
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
generate:
SELECT *
On Sun, Dec 21, 2008 at 7:56 PM, Ron Piggott 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
> > generate:
> >
> > SELECT * FRO
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` =
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 r
Ron
You want SELECT DISTINCT ... or SELECT FROM
GROUP BY
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 row;
if all you're after
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 while
--
Best Regards,
Shahmat Dahlan
Research and Development
SAINS
Mobile: +(60)16 882 6130
Office: +(60)82 426 733 ext 5512
--- Begin Message ---
(1)
i've been using this method for years now, maybe somebody else has a
better way to do this?
";
php codes
$i++;
}
?>
(2) check out the limit
From: "Ron Piggott (PHP)" <[EMAIL PROTECTED]>To: "PHP DB"
Date: Sun, 04 Dec 2005 13:38:58 -0500Subject:
SELECT & html
I have two questions. I would like to display the contents of my table
with the first row being grey in background and the next row being whit
work in this case?
>
> Thanks
>
> -Original 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:
>
>> H
vid 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&qu
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 wro
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 say
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 bericht---
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,
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)
> 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 T
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
gyintl.com/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:
merce/
---
-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
008f01c2b
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 tr
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
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
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
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 c
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
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 (staff.staffID=cours
"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 outpu
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 s
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 s
35 matches
Mail list logo