[PHP-DB] query help

2010-11-17 Thread Vinay Kannan
Hello PHP Gurus, I need your help on an insert query. I wanted to know if there is way to insert an array of values into a DB. An eg would explain this better : If I have 2 tables in a DB, 1) users has 3 columns 2) hobbies = 5 columns I was thinking of having a single function which will

Re: [PHP-DB] query help

2010-11-17 Thread Artur Ejsmont
well i guess you could do that. but it gets complicated after a while and there will be a lot of work and probably after a while you will get into some problems. You have to handle escaping, special types etc. Then what about performance? how to query the data ... using similar approach or is

Re: [PHP-DB] query help

2010-11-17 Thread Bastien Koert
On Wed, Nov 17, 2010 at 8:51 AM, Vinay Kannan viny...@gmail.com wrote: Hello PHP Gurus, I need your help on an insert query. I wanted to know if there is way to insert an array of values into a DB. An eg would explain this better : If I have 2 tables in a DB, 1) users has 3 columns 2)

Re: [PHP-DB] query help

2010-11-17 Thread Max E.K
From: Vinay Kannan viny...@gmail.com To: PHP DB php-db@lists.php.net, php mysql php_mysql_usergr...@yahoogroups.com Sent: Wednesday, November 17, 2010 2:51:35 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: [PHP-DB] query help Hello PHP Gurus, I need your help

Re: [PHP-DB] query help

2010-11-17 Thread Niel Archer
Hello PHP Gurus, I need your help on an insert query. I wanted to know if there is way to insert an array of values into a DB. An eg would explain this better : If I have 2 tables in a DB, 1) users has 3 columns 2) hobbies = 5 columns I was thinking of having a single function which

RE: [PHP-DB] query help

2010-11-17 Thread Constantin Brinzoi
[mailto:ejsmont.ar...@gmail.com] Sent: 17 noiembrie 2010 16:07 To: Vinay Kannan Cc: PHP DB; php mysql Subject: Re: [PHP-DB] query help well i guess you could do that. but it gets complicated after a while and there will be a lot of work and probably after a while you will get into some

RE: [PHP-DB] query help

2010-11-17 Thread Ashay Chaudhary
The most performant methods are to use well parameterized stored procedure or a prepared parameterized statement. : Ashay -Original Message- From: Niel Archer [mailto:n...@chance.now] Sent: Wednesday, November 17, 2010 6:30 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] query help

[PHP-DB] Query help

2004-07-09 Thread Craig Hoffman
Hey Everyone, I can use some help here I have query where one can selects an style then a area and finally rating through a drop menu. When some selects a rating they select a range of ratings. For example: Style: Traditional Area: Yosemite Rating: From: 5.5 To: 5.10c This should pull

[PHP-DB] Query Help!

2004-04-08 Thread JeRRy
Hi Everyone, Happy Easter to you all. I have this query, reasoning for posting on this Mailing List is under it. :) SELECT `username` , `score` FROM round . $round_number . WHERE 1 ORDER BY `score` DESC LIMIT 0, 30 Is there a way to make it output the $round_number -1 (minus one number)? I

[PHP-DB] Query Help...

2003-03-10 Thread NIPP, SCOTT V (SBCSI)
I am having a lot of trouble with a query that works fine from a basic SQL command line, but fails in my web script. Here is the portion of code including the query: mysql_select_db($database, $Prod); $query_groups = SELECT name FROM group; $groups = mysql_query($query_groups, $Prod) or

RE: [PHP-DB] Query Help...

2003-03-10 Thread George Pitcher
]' Subject: [PHP-DB] Query Help... I am having a lot of trouble with a query that works fine from a basic SQL command line, but fails in my web script. Here is the portion of code including the query: mysql_select_db($database, $Prod); $query_groups = SELECT name FROM group; $groups

Re: [PHP-DB] Query Help...

2003-03-10 Thread Rob Bryant
- Original Message - From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 10, 2003 9:23 AM Subject: [PHP-DB] Query Help... I am having a lot of trouble with a query that works fine from a basic SQL command line, but fails in my web script. Here

RE: [PHP-DB] Query Help...

2003-03-10 Thread NIPP, SCOTT V (SBCSI)
To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query Help... - Original Message - From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 10, 2003 9:23 AM Subject: [PHP-DB] Query Help... I am having a lot of trouble with a query that works fine from a basic SQL

[PHP-DB] Query Help

2002-11-05 Thread Josh Johnson
I've implemented the scheme I briefly outlined in my last post (locking for data integrity), and now I'm writing queries to get totals from my logs, and I think I might be over-complicating things, and I'd like some alternative views on the subject. My grandiose scheme works like this: Problem:

[PHP-DB] Query Help

2001-12-16 Thread Shannon Doyle
Hi people, I have a small problem with a select cause that I need to use. I basically need the following. Select * from table where page =3D=3D page_name The fields in the db are code,description,unit,price,category,minor_category Then the display needs to be something along the lines of

RE: [PHP-DB] Query help

2001-11-19 Thread Matt Williams
This doesn't work either. SELECT count(freerooms.room), WEEK(MAX(booking.date),1), WEEK(MIN(booking.date),1) as total FROM freerooms LEFT JOIN booking USING(room); All good so far now if I run this SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f,

Re: [PHP-DB] Query help

2001-11-19 Thread Dobromir Velev
- From: Matt Williams [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Monday, November 19, 2001 10:26 Subject: RE: [PHP-DB] Query help This doesn't work either. SELECT count(freerooms.room), WEEK(MAX(booking.date),1), WEEK(MIN(booking.date

[PHP-DB] Query help

2001-11-16 Thread Matt Williams
Not really this list but I'm after a quick bit of help. If I run this query select count(room) from freerooms; -83 and this SELECT WEEK(MAX(date),1), WEEK(MIN(date),1)as totalweeks FROM booking; -4840 All good so far now if I run this SELECT count(f.room),WEEK(MAX(b.date),1),

Re: [PHP-DB] Query help

2001-11-16 Thread Andrey Hristov
it in USING Other problems? Write.. Regards, Andrey Hristov IcyGEN Corporation http://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Matt Williams [EMAIL PROTECTED] To: Php-Db@Lists. Php. [EMAIL PROTECTED] Sent: Friday, November 16, 2001 5:20 PM Subject: [PHP-DB] Query help

Re: [PHP-DB] Query help

2001-11-16 Thread Andrey Hristov
5:32 PM Subject: Re: [PHP-DB] Query help SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f, booking b; will be SELECT count(f.room),WEEK(MAX(b.date),1), WEEK(MIN(b.date),1) FROM freero oms f LEFT JOIN booking USING(room) b; room is the field which connects

[PHP-DB] query help

2001-02-12 Thread Stinsman, Scott
can anyone figure out why the following code works fine when both select variables = "ALL" and also when only 1 of the 2 ="ALL" but NOT when BOTH select variables equal something other than "ALL"? here is the code: What area of the city would you like to dine in? ?php