[PHP-DB] sql query, editing?

2004-01-15 Thread Louie Miranda
I have this code below, it fetches data on a mysql database. I was hoping you could give me a code hint on where could, my goal is to display this data on a browser which i did already and be able to edit it via a form. edit? - table1=value - table2=value I dont know where to start. please help

RE: [PHP-DB] sql query, editing?

2004-01-15 Thread Humberto Silva
Create a form for editing the record Then on the display funtion just put a link on each record to that form and pass the id of that record like a href=editrecord.php?id=?=$row['id']?edit/a On the edit form just grab the data of the $id passed on the url and put those values on the input fields

[PHP-DB] SQL query...

2004-01-15 Thread Tristan . Pretty
SELECT DISTINCT(file_name), Count(file_name) FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by ??? desc In the above sql statement, I'm trying to achieve: 1. select all file names, between two dates. 2. list them, and order by the highest number

RE: [PHP-DB] SQL query...

2004-01-15 Thread brett king
SELECT DISTINCT(file_name), Count(file_name) FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by ??? desc In the above sql statement, I'm trying to achieve: 1. select all file names, between two dates. 2. list them, and order by the highest number of

RE: [PHP-DB] SQL query...

2004-01-15 Thread Tristan . Pretty
Ah... you can name the count().. live and learn, cheers dude... brett king [EMAIL PROTECTED] 15/01/2004 11:17 Please respond to [EMAIL PROTECTED] To [EMAIL PROTECTED], [EMAIL PROTECTED] cc Subject RE: [PHP-DB] SQL query... SELECT DISTINCT(file_name), Count(file_name) FROM $table_name

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

2004-01-15 Thread Nitin Mehta
use alias for 'Count(file_name)' to use in order by clause F.x. SELECT DISTINCT(file_name), Count(file_name) as file_count FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by file_count desc Hope that solves it Nitin - Original Message - From:

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

2004-01-15 Thread Muhammed Mamedov
Try this SELECT DISTINCT(file_name), Count(file_name) AS cnt FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by cnt; desc Regards, Muhammed Mamedov tmchat.com - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent:

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

2004-01-15 Thread CPT John W. Holmes
From: Muhammed Mamedov [EMAIL PROTECTED] Try this SELECT DISTINCT(file_name), Count(file_name) AS cnt FROM $table_name WHERE date BETWEEN '2003-10-01' AND '2003-12-31' group by file_name order by cnt; desc If you're GROUPing by file_name then you don't need DISTINCT(file_name)... it's

[PHP-DB] Multiple SQL queries

2004-01-15 Thread Arthur Pelkey
I am new this. I have a page that has multiple queries on it, I want to do doing the following: Query a mysql db multiple times in the same page, but i must be missing something, I keep getting these AFTER the first queryis successful: Warning: mysql_fetch_array(): supplied argument is not a

[PHP-DB] Re: sql query, editing?

2004-01-15 Thread Justin Patrin
Louie Miranda wrote: I have this code below, it fetches data on a mysql database. I was hoping you could give me a code hint on where could, my goal is to display this data on a browser which i did already and be able to edit it via a form. edit? - table1=value - table2=value I dont know where

[PHP-DB] Re: Multiple SQL queries

2004-01-15 Thread Justin Patrin
Arthur Pelkey wrote: I am new this. I have a page that has multiple queries on it, I want to do doing the following: Query a mysql db multiple times in the same page, but i must be missing something, I keep getting these AFTER the first queryis successful: Warning: mysql_fetch_array():

RE: [PHP-DB] Re: Multiple SQL queries

2004-01-15 Thread Arthur Pelkey
Thanks ill check that out -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Thursday, January 15, 2004 12:35 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Multiple SQL queries Arthur Pelkey wrote: I am new this. I have a page that has multiple queries on it,

[PHP-DB] multi-language site

2004-01-15 Thread Dan Hewins
Forgive me if this is pedestrian or has been covered before. I'm new to the list and I haven't used PHP too much (yet). Here's my question: I'm looking to use PHP for an upcoming site project where the site needs to be in either English or Spanish. Would PHP be a good approach? I was

[PHP-DB] Solaris apache 2.0.47 + php 4.3.4 + oracle 9i ( oci8 support in php as shared module )

2004-01-15 Thread Daniel Sand
Hi Folks, I have an generic question. first of all. The stuff runs fine. But ( the question ? ) If i make any DB connections from any Virtual Server that i configured in apache, PHP always takes the Main Ethernet Interface. Not The Virtual IP's of the card that are configure in the

Re: [PHP-DB] multi-language site

2004-01-15 Thread Ignatius Reilly
I would not consider a DB-based design. I use two approaches (sometimes mixed): 1. Write content in XML files (one per language) and transform them with XSLT. This is nice for mostly content-based sites. 2. Write the complete application in English and translate it with the excellent PHP

[PHP-DB] Re: multi-language site

2004-01-15 Thread Justin Patrin
Please don't send a new message as a reply to a previous posting. It breaks threading (which associates replies to the message it replied to) and makes it seem that your new post is a reply to an completely unrelated message. Instead, please create a new message and enter the newsgroup or list

Re: [PHP-DB] multi-language site

2004-01-15 Thread Ignatius Reilly
Hi. Richard, you seem to be confusing gettext with something else. Gettext is NOT an automated translation service. What you do is mark strings to translate in the original application, then have them translated by a human. When confronted with a marked string to echo, the application will look

Re[2]: [PHP-DB] multi-language site

2004-01-15 Thread Richard Davey
Hello Ignatius, Thursday, January 15, 2004, 6:41:44 PM, you wrote: IR Gettext is NOT an automated translation service. What you do is mark strings IR to translate in the original application, then have them translated by a IR human. When confronted with a marked string to echo, the application

[PHP-DB] db php question

2004-01-15 Thread redhat
I have a very crude script set up that I am using to keep track of IP addresses, MAC addresses, etc and it dumps into mysql. I am using a column called id which is my primary key and auto-increments. My question is that I want to make sure that I don't get duplicate IP addresses added into the

Re: [PHP-DB] Solaris apache 2.0.47 + php 4.3.4 + oracle 9i ( oci8 support in php as shared module )

2004-01-15 Thread Martin Marques
Mensaje citado por Daniel Sand [EMAIL PROTECTED]: Hi Folks, I have an generic question. first of all. The stuff runs fine. But ( the question ? ) If i make any DB connections from any Virtual Server that i configured in apache, PHP always takes the Main Ethernet Interface. Not The

Re: [PHP-DB] db php question

2004-01-15 Thread Richard Davey
Hello, Thursday, January 15, 2004, 7:09:25 PM, you wrote: r I have a very crude script set up that I am using to keep track of IP r addresses, MAC addresses, etc and it dumps into mysql. I am using a r column called id which is my primary key and auto-increments. My r question is that I want

Re: Re[2]: [PHP-DB] multi-language site

2004-01-15 Thread Ignatius Reilly
Quite right. When implementing gettext, one will normally use the rule 1 string = 1 sentence (such as please select a country). _ - Original Message - From: Richard Davey [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 19:48 Subject:

[PHP-DB] PHP4.2.3 and Oracle 9.2

2004-01-15 Thread William Cheung
I am using PHP 4.2.3 and Oracle 9.2. I have a test file that runs successfully in command line. But when I use a browser to open the file, it gives SQL error. Could anyone give me any insight what could be wrong? Testora.php: ?php $conn_ptr =

[PHP-DB] Re: PHP4.2.3 and Oracle 9.2

2004-01-15 Thread Justin Patrin
Error display on browser: Warning: SQL error: Specified driver could not be loaded due to system error 5 (Oracle in OraHome92)., SQL state IM003 in SQL Connect in c:\inetpub\wwwroot\PHP\testora.php on line 2. Warning: odbc_exec(): Supplied argument is not a valid ODBC-Link resource in

[PHP-DB] Re: L'utente Fabio Farinelli ha cambiato indirizzo di posta elettronica.

2004-01-15 Thread Ignatius Reilly
Somebody with admin rights to this list please castrate this Farinelli user. Thanks _ - Original Message - To: Ignatius Reilly [EMAIL PROTECTED] Sent: Thursday, January 15, 2004 20:22 Subject: L'utente Fabio Farinelli ha cambiato indirizzo di posta elettronica.

[PHP-DB] Re: L'utente Fabio Farinelli ha cambiato indirizzo di posta elettronica.

2004-01-15 Thread Justin Patrin
Ignatius Reilly wrote: Somebody with admin rights to this list please castrate this Farinelli user. +1 on that! -- paperCrane Justin Patrin -- Question Everything, Reject Nothing -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Connectivity PHP4 mysql

2004-01-15 Thread Georg Herland
Hi I've got two servers, one (RH9) with PHP4 and mysql-server and one (RH7.3) running PHP4 and mysql client only. The problem is that I get the following errormessage from PHP when trying to open a db-link: PHP Fatal error: Call to undefined function: mysql_connect() in

Re: [PHP-DB] Connectivity PHP4 mysql

2004-01-15 Thread Micah Stevens
Sounds like you don't have MySQL turned on in PHP. Check phpinfo(); to see if the module is listed in there. -Micah On Thu January 15 2004 2:42 pm, Georg Herland wrote: Hi I've got two servers, one (RH9) with PHP4 and mysql-server and one (RH7.3) running PHP4 and mysql client only. The