RE: [PHP-DB] Query with numbers like 1, 3, 5..........

2002-02-07 Thread Rick Emery
, 2002 3:37 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query with numbers like 1, 3, 5.. Hi again Rick! : ) It is because I am trying to list all products that I have in a database into a menu page. And I would like to have two products beside eachothers. So... is it possible to get

Re: [PHP-DB] Query with numbers like 1, 3, 5..........

2002-02-07 Thread Mike Gohlke
Subject: RE: [PHP-DB] Query with numbers like 1, 3, 5.. Yes, but the question is why? -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:22 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query with numbers like 1, 3, 5

RE: [PHP-DB] Query with numbers like 1, 3, 5..........

2002-02-07 Thread Rick Emery
I like Mike's WHILE-loop better than my solution. thanks, Mike -Original Message- From: Mike Gohlke [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 3:56 PM To: Raymond Lilleodegard; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query with numbers like 1, 3, 5

Re: [PHP-DB] Query with numbers like 1, 3, 5..........

2002-02-07 Thread Raymond Lilleodegard
ay to do it? Reagrds Raymond - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Raymond Lilleodegard' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 8:55 PM Subject: RE: [PHP-DB] Query with numbers like 1, 3, 5.. Yes, but the questio

[PHP-DB] query error...

2002-02-05 Thread jas
Ok what is wrong with this sql statement? $sql = UPDATE $table_name SET c_name=\$c_name\,s_addy=\$s_addy\,city=\$city\,state=\state\zip=\zi p\,phone=\$phone\; The error I recieve is as follows Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /path/to/wwwdemo_change.php3 on line

Re: [PHP-DB] query error...

2002-02-05 Thread biorn
Try putting single quotes around your variables in your update statement instead of the escaped double quotes, they are easier to read. Also, were you wanting to update all entries in that table to the same, c_name, s_addy, city, state, zip and phone? If not, you will need to add 'where

Re: [PHP-DB] query error...

2002-02-05 Thread DL Neil
Ok jas Ok what is wrong with this sql statement? $sql = UPDATE $table_name SET c_name=\$c_name\,s_addy=\$s_addy\,city=\$city\,state=\state\zip=\zi p\,phone=\$phone\; insufficient checking: comma missing between state and zip incorrectly escaped before phone ... I have looked on MySQL.com

Re: [PHP-DB] query error...

2002-02-05 Thread Miles Thompson
Did you type this out or cut/paste? There was a comma missing between state\zip . Should work when you add the comma. Add a WHERE condition for the update, otherwise every row will be set to these values. Common practice is to use single quotes around the char variables, saves a lot of

Re: [PHP-DB] query from two tables

2002-02-04 Thread DL Neil
Hi Balazs, The situation: I have 2 tables in an adverising site. In one table, i have the cities used by advertisers, and in the other there are the ads.This ad table has a field which refers to the id of the city in that table. The problem: what mysql method should i use if i want to

RE: [PHP-DB] query from two tables

2002-02-04 Thread Rick Emery
JOIN adverts a using(city_id) ORDER BY city; -Original Message- From: Ivan Balazs [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 6:26 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] query from two tables Hi! The situation: I have 2 tables in an adverising site. In one table, i

[PHP-DB] query problem

2002-01-21 Thread Sommai Fongnamthip
Hi, I have problem with these mysql's query: select * from holder, management where holder.id=management.id or (holder.name=management.name and holder.surname=management.surname) order by holder.no It take a long time (more than 1 minute) with thousand record. I have

Re: [PHP-DB] query problem

2002-01-21 Thread Jason Wong
On Tuesday 22 January 2002 13:18, Sommai Fongnamthip wrote: Hi, I have problem with these mysql's query: select * from holder, management where holder.id=management.id or (holder.name=management.name and holder.surname=management.surname) order by holder.no It take a

[PHP-DB] Query Optimizing on sum() function

2002-01-10 Thread Nomor Satu Bajingan
Hello Friends, I've some performance problem, when I do sum() functions on my tables it took 5-7 minutes to return the results.. here is my story: I've table with 2461566 rows here is my table structure: mysql describe imp_log;

Re: [PHP-DB] Query Optimizing on sum() function

2002-01-10 Thread php3
Addressed to: Nomor Satu Bajingan [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from Nomor Satu Bajingan [EMAIL PROTECTED] Thu, 10 Jan 2002 13:51:06 + Hello Friends, I've some performance problem, when I do sum() functions on my tables it took 5-7 minutes to return

[PHP-DB] query and count

2002-01-09 Thread Barry Rumsey
I have two tables, the first one I query like : $query = SELECT * FROM xp_topics WHERE artist_count='artist' AND topictext LIKE 'B%' ORDER BY artist_count DESC limit 0,5; $req = mysql_query($query); $res = mysql_num_rows($req); if ($res == 0) { echo /p pbSorry

Re: [PHP-DB] query and count

2002-01-09 Thread Daniel Barton
Hi, I hate to simply refer to other sources in a response, but cross-tabulations are a large and rich subject which are too large for the time I have to write this email. I would suggest reading this article: http://www.devshed.com/Server_Side/MySQL/MySQLWiz which is a pretty good source

[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 to check valid emails

2001-11-28 Thread Russ Michell
select * from tbl where email like %$email%; This will find the string stored in the variable '$email' in the column 'email' Adjust having the '%' at the end, the beginning or both (as above) as they will find the string '$email' at end or at the beginning of the string stored in the column

Re: [PHP-DB] query to check valid emails

2001-11-28 Thread Jon Farmer
No this will not do what the original poster requested it will be something like the following select * from table where email regexp ^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$; Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob

Re: [PHP-DB] query to check valid emails

2001-11-28 Thread Russ Michell
Glad someone knows more than I do, or that chap would be right up a certain creek without a paddle.. Cheers Russ On Wed, 28 Nov 2001 09:44:26 - Jon Farmer [EMAIL PROTECTED] wrote: No this will not do what the original poster requested it will be something like the following select

[PHP-DB] query + loop problem

2001-11-28 Thread Russ Michell
Hi there everyone: I have a generic query containing variables, substituted for values dependant upon specific circumstances: //query the DB on the basis of searches employing text input fields (LIKE) if($sql_clause == 'LIKE') { $sql = SELECT * FROM $table WHERE $field $sql_clause

Re: [PHP-DB] query + loop problem

2001-11-28 Thread Andrey Hristov
://www.icygen.com BALANCED SOLUTIONS - Original Message - From: Russ Michell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 28, 2001 5:36 PM Subject: [PHP-DB] query + loop problem Hi there everyone: I have a generic query containing variables, substituted for values

Re: [PHP-DB] query + loop problem

2001-11-28 Thread Daniel Barton
Try using mysql_query to describe the table in question (describe $table), and use the output as a list of field names (and types). I wrote a generic script to do this for an app... can provide if needed (although it sure looks a little hacked right now, hmmm) -db Russ Michell wrote: Hi

Re: [PHP-DB] query + loop problem

2001-11-28 Thread Russ Michell
PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 28, 2001 5:36 PM Subject: [PHP-DB] query + loop problem Hi there everyone: I have a generic query containing variables, substituted for values dependant upon specific circumstances: file://query the DB on the basis

[PHP-DB] query to check valid emails

2001-11-27 Thread Noah Spitzer-Williams
what's the LIKE query to see if an email address is valid? For example, in PHP it's something like if (eregi(^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,3}$,$ email,$check)) { echo valid; } i want to sort through rows in a db and look for invalid email

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 construction

2001-09-19 Thread Russ Michell
Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table field of different team names (stored as a single string), but it does't seem to work! SELECT * FROM $table_users WHERE usrName='$username' AND usrPswd=password('$password')

RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
When you printed-out the string variable containing the SELECT statement, what did it look like? -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query construction Hi there: Further

Re: RE: [PHP-DB] Query construction

2001-09-19 Thread Russ Michell
? -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query construction Hi there: Further to a previous submission (which can be ignored), I'd like the following query to 'search' a table

RE: RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction If you mean did the pattern I'm trying to match: $team, contain what I though it should: 'footballSat' then yes it did. I also receieve no error message from MySQl The string in the table field I can view/alter

Re: RE: RE: [PHP-DB] Query construction

2001-09-19 Thread Russ Michell
- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:19 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction If you mean did the pattern I'm trying to match: $team, contain what I though it should: 'footballSat' then yes

Re: [PHP-DB] Query construction

2001-09-19 Thread Steve Cayford
Usually what I do when I'm having this type of problem is put the whole sql statement into a string variable then print the variable out just before running the query so you know exactly what's being sent to mysql. Then I log into mysql from the command line and enter the query manually to

RE: RE: RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: RE: [PHP-DB] Query construction I'm sorry but I must be missing something fundamental here. This is how my code looks, and if the SQL query yields nothing and emits no error (as it currently is) it simply reverts to error.php: $sql = SELECT * FROM

RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
YES!!! Exactly Russ...do what Steve syas... -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:32 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query construction Usually what I do when I'm having

Re: RE: [PHP-DB] Query construction

2001-09-19 Thread Russ Michell
... -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:32 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query construction Usually what I do when I'm having this type of problem is put the whole sql

RE: RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:56 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction Ok ok ok!! Thank you both for the pointers, they did of course yield the problem - as bloody always it's something completely different! As my old-dad

Re: RE: RE: [PHP-DB] Query construction

2001-09-19 Thread Russ Michell
of time... p.s. Your father is a psychiatrist??? Now, there, I could use some help... -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:56 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction

[PHP-DB] query question

2001-08-28 Thread L Melville
Hi, If I run a query;- $result = mysql_query($query); is there a way of deleting rows from $result after this runs. Or does anyone have any idea of how $result is generally structured when mysql_query($query) is run. thanks -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] query question

2001-08-28 Thread Dave Watkinson
instead of SELECT all_records WHERE some_condition, and then DELETE certain_rows, couldn't you just do a DELETE FROM WHERE? -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: 28 August 2001 14:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] query question Hi, If I

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
Subject: [PHP-DB] query question Hi, If I run a query;- $result = mysql_query($query); is there a way of deleting rows from $result after this runs. Or does anyone have any idea of how $result is generally structured when mysql_query($query) is run. thanks -- PHP Database Mailing Li

RE: [PHP-DB] query question

2001-08-28 Thread Rick Emery
out those rows you do not want. rick -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 8:21 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] query question Hi, If I run a query;- $result = mysql_query($query); is there a way of deleting rows from

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
ake your selection criteria more precise. Then, fetch row by row to weed out those rows you do not want. rick -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 8:21 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] query question Hi, If I run

RE: [PHP-DB] query question

2001-08-28 Thread Jon Farmer
] -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: 28 August 2001 14:41 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] query question I want to loop round $result fetching rows and if the current row is not needed then removing it from $result, $result will then get used again

Re: [PHP-DB] query question

2001-08-28 Thread L Melville
01 14:41 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] query question I want to loop round $result fetching rows and if the current row is not needed then removing it from $result, $result will then get used again but with the said rows removed. I am trying to do this to avoid some major code changes w

RE: [PHP-DB] query question

2001-08-28 Thread Jon Farmer
PROTECTED] -Original Message- From: L Melville [mailto:[EMAIL PROTECTED]] Sent: 28 August 2001 14:54 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] query question yeh this would work, how can I assign the rows to a new array? Is each row accessed as an element? Jon Farmer [EMAIL PROTECTED

Re: [PHP-DB] Query construction (again)

2001-08-23 Thread Russ Michell
PM Subject: [PHP-DB] Query construction (again) Hey there folks - similar problem - different project! I want to select some records for a period of 7days after their insert [dateFrom] date. Last time I asked you guys for help I was helped toward the following solution: $sql

SV: [PHP-DB] Query construction (again)

2001-08-23 Thread Torgil Zechel
PROTECTED] Sent: Wednesday, August 22, 2001 10:16 PM Subject: [PHP-DB] Query construction (again) Hey there folks - similar problem - different project! I want to select some records for a period of 7days after their insert [dateFrom] date. Last time I asked you guys for help I

Re: SV: [PHP-DB] Query construction (again)

2001-08-23 Thread Russ Michell
Skickat: den 23 augusti 2001 11:46 Till: Gremlins Mailing List Kopia: [EMAIL PROTECTED] Amne: Re: [PHP-DB] Query construction (again) (Apologies for cross-postings here but I lost a php-db list members personal email address..) I need a query that in English would read something like

[PHP-DB] Query construction (again)

2001-08-22 Thread Russ Michell
Hey there folks - similar problem - different project! I want to select some records for a period of 7days after their insert [dateFrom] date. Last time I asked you guys for help I was helped toward the following solution: $sql = SELECT * FROM $Tpostings WHERE now()=dateFrom AND now()dateTo;

Re: [PHP-DB] Query construction (again)

2001-08-22 Thread Gremlins Mailing List
- Original Message - From: Russ Michell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 10:16 PM Subject: [PHP-DB] Query construction (again) Hey there folks - similar problem - different project! I want to select some records for a period of 7days after

Re: [PHP-DB] Query construction (again)

2001-08-22 Thread Jason Wong
- Original Message - From: Russ Michell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 22, 2001 10:16 PM Subject: [PHP-DB] Query construction (again) Hey there folks - similar problem - different project! I want to select some records for a period of 7days after

[PHP-DB] Query construction

2001-08-21 Thread Russ Michell
Hi there people: I have a MySQL table consisting of category names among other things. I would like to be able to construct a query that tells me the number of times a unique category name occurs in the table: //Table 'posts' from command-line mysql explain posts;

Re: RE: RE: [PHP-DB] Query construction

2001-08-21 Thread Russ Michell
- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: 21 August 2001 12:46 To: Lunny Damian Subject: Re: RE: [PHP-DB] Query construction Damian: Thanks for that but it doesn't do what I wanted though. It actually returns the first item ('some stuff') from the table, where I

Re: RE: RE: RE: [PHP-DB] Query construction

2001-08-21 Thread Russ Michell
Damian Cc: [EMAIL PROTECTED] Subject: Re: RE: RE: [PHP-DB] Query construction Damn!! That'll be it.. I'm running phpMyAdmin 2.1.0 , php.4.0.3pl1 and MySQL 3.22.32 Then again I don't get an error message from your query..??? Perhaps it has to do with the query being embedded

Re: RE: RE: RE: [PHP-DB] Query construction

2001-08-21 Thread Alnisa Allgood
At 1:44 PM +0100 8/21/01, Russ Michell wrote: I always love that feeling when you beat a problem that refuses to go away. So do I - but I aint beaten it yet! :-( I'm still getting '2' as being the number of posts in each category when '2' is actually only the number of posts in *one* of the

RE: [PHP-DB] Query construction

2001-08-21 Thread Russ Michell
PROTECTED] Subject:Re: RE: RE: RE: [PHP-DB] Query construction I always love that feeling when you beat a problem that refuses to go away. So do I - but I aint beaten it yet! :-( I'm still getting '2' as being the number of posts in each category when '2' is actually only

Re: [PHP-DB] query returned Resource id #2

2001-08-17 Thread grant
That Resource ID #2 is the connection or result set. You need to use the connection to do a query, which returns a result set, then use the result set to do fetches. Those will return an array of the stuff you really wanted.

Re: [PHP-DB] query returned Resource id #2

2001-08-17 Thread Alex
Could you give me an example? Grant wrote: That Resource ID #2 is the connection or result set. You need to use the connection to do a query, which returns a result set, then use the result set to do fetches. Those will return an array of the stuff you really wanted.

Re: [PHP-DB] query returned Resource id #2

2001-08-17 Thread grant
This uses PostgreSQL, but the concepts are the same for MySQL. On Fri, 17 Aug 2001, Alex wrote: Could you give me an example? Grant wrote: That Resource ID #2 is the connection or result set. You need to use the connection to do a query, which returns a result set, then use the result

[PHP-DB] Query and Date problem

2001-08-15 Thread Jeff Oien
I want to retrieve the last 15 days of data from a certain time but not today's. I have this but it's still giving me today's data: $today = date(Y-m-d); $sql = SELECT volume, date, time, id FROM $table_name where time = $time1 and date != $today ORDER by id desc LIMIT 15; (date != $today)

[PHP-DB] Query on Oracle Views

2001-08-06 Thread Rankin, Randy
I am connecting to an Oracle 8 server using OCI, PHP and Apache on a RH Linux 7.1 box. All works well until I try to query an Oracle dynamic view like the following: $query = SELECT instance_name, host_name FROM v$instance; When I execute this query, the server returns the following error.

Re: [PHP-DB] Query on Oracle Views

2001-08-06 Thread Paul Burney
on 8/6/01 5:33 PM, Rankin, Randy at [EMAIL PROTECTED] wrote: When I execute this query, the server returns the following error. Warning: OCIStmtExecute: ORA-00942: table or view does not exist in /usr/local/apache/htdocs/oracle/oraprod.php on line 17 My suspicion is that PHP thinks that

[PHP-DB] Query displays one

2001-07-29 Thread Mike Gifford
Hello, I've got a pretty basic query which I am trying to run within a function. The query looks like this: SELECT a.title,a.alt_title,a.articleID,a.articleSectionID,sect.URLname FROM $articlestable a, $categorytable sect WHERE a.articleSectionID = sect.articleSectionID

Re: [PHP-DB] Query in a function

2001-06-26 Thread Shahmat Dahlan
How about declaring some of the variables as global variables. regards seriousj wrote: Hello I have a query that I have placed in a function that is in a file that I include in the page to be displayed. It doesn't work. I know that the code works because when I place the code in the page

[PHP-DB] Query through two tables

2001-06-20 Thread Michael P. Mehl
Hi! I've got two tables: CREATE TABLE users ( user_id bigint(20) unsigned DEFAULT '0' NOT NULL, contact_id bigint(20) unsigned DEFAULT '0', user_login varchar(100) NOT NULL, PRIMARY KEY (user_id), UNIQUE UC_user_id (user_id)

[PHP-DB] Query in a function

2001-06-19 Thread seriousj
Hello I have a query that I have placed in a function that is in a file that I include in the page to be displayed. It doesn't work. I know that the code works because when I place the code in the page to be displayed directly it works fine. I can't figure it out. Thanks in advance for any help.

Re: [PHP-DB] Query in a function

2001-06-19 Thread Jimmy Brake
errr maybe you need to pass the function the values of the variables you are using either by declaring them global inside the function: global $server,$user,$pass,$type_id; or passing them to the function directly: function type_select($server,$user,$pass,$type_id) hope this helps :-)

Re: [PHP-DB] Query in a function

2001-06-19 Thread Andreas D. Landmark
At 19.06.2001 09:21, you wrote: Hello I have a query that I have placed in a function that is in a file that I include in the page to be displayed. It doesn't work. I know that the code works because when I place the code in the page to be displayed directly it works fine. I can't figure it out.

[PHP-DB] Query problem cont'd..

2001-04-26 Thread Russ Michell
Hi there: I'm stil having problems with this query in that it doesn't bring up any results! Here is the select menu that refreshes the page and deposites the var: 'sortedBy' into play: form select name=\sortMonth\ onChange=\MM_jumpMenu('parent',this,0)\; option--select one--/option option

RE: [PHP-DB] Query problem cont'd..

2001-04-26 Thread Steve Brett
and drop inside to create the query. that way you avoid an expensive if or or or or ... Steve -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: 26 April 2001 10:50 To: [EMAIL PROTECTED] Subject: [PHP-DB] Query problem cont'd.. Hi there: I'm stil having

[PHP-DB] query problem

2001-04-25 Thread Russ Michell
Hi all: I'm using mysql-3.22.32: My PHP-embedded query is as follows: else if($sortBy == '01') { $sql = SELECT * FROM $table_cal WHERE item_activity='$id' AND DATE_FORMAT('item_date','%m') LIKE '$sortBy'; $sortBy = Month of January; } * '$sortBy' is equal to '01'. *

Re: [PHP-DB] Query with Access

2001-04-01 Thread Gary Huntress
I'd try adding: $conn = odbc_connect("pruebas_php", "", "") or die("cannot connect to pruebas_php"); $resultado1 = odbc_exec($conn,"SELECT Nombre, Apellido1, Apellido2 FROM Personas") or die ("cannot execute query"); -- Regards, Gary "SuperID" Huntress

[PHP-DB] Query - Grouping Results

2001-03-19 Thread Jordan Elver
Hi, I've got a table like: id user_id ip time 1 2 127.0.0.1 20010316105018 Etc, etc. I do a join on the this table and the users table to get the coresponding username to user_id like this: SELECT users.name AS name, user_logins.ip AS ip,

[PHP-DB] Query times

2001-03-07 Thread Norman Tan
How do I get the query times echoed like this? http://www.ub2k.com/alpha/UltraBoard.php Thanks -- Norman Tan North Shore Interactive http://www.nsmb.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP-DB] Query qizzle quackarooney! :|

2001-02-13 Thread Trond Erling Hundal
Hey there fellow querieres I summon your power! (eh..) well.. enough with the nonsense :) I have a littlebit of problem: I am displaying 15 different newsarticles on a page. The articles are displayed in three different tables. First there`s one article (the main-top-story) that is shown

Re: [PHP-DB] Query qizzle quackarooney! :|

2001-02-13 Thread fabrizio . ermini
On 13 Feb 2001, at 11:41, Trond Erling Hundal wrote: Hey there fellow querieres I summon your power! (eh..) well.. enough with the nonsense :) I have a littlebit of problem: I am displaying 15 different newsarticles on a page. The articles are displayed in three different tables.

[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

[PHP-DB] query error

2001-01-25 Thread Randy Johnson
When I run any kind of query this is the value of result Resource id #2 Example $result= mysql_query (" Select * from ACCT_TBL ") or die ("Error".mysql_error()); print result; any ideas? randy -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: [PHP-DB] query error

2001-01-25 Thread Mark Newnham
Looks fine, now retrieve the rows from the query. -Original Message- From: Randy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 25, 2001 12:46 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] query error When I run any kind of query this is the value of result

Re: [PHP-DB] Query Access DB by date

2001-01-12 Thread John
Oops. Seems to work when I put the pound sign in the front and back of the date :-) Thanks. John When I try to query an Acess database for a particular date I get ODBC errors indicating I'm screwing up the call. Can anyone give me an example of a select on a date field. Quotes make it think

<    1   2   3