Re: [PHP-DB] Shift_JIS Character Set

2003-12-11 Thread Ng Hwee Hwee
thanks for your reply.. i'm doing a form (form.php) 1) user comes to form.php 2) user enters details and press submit 3) details get passed to form action verify.php 4) verify.php puts all the $_POST into an array $formVars 5) verify.php session_register("formVars") 6) if there is an error, verify

Re: [PHP-DB] Shift_JIS Character Set

2003-12-11 Thread Jason Wong
On Friday 12 December 2003 13:47, Ng Hwee Hwee wrote: > i've read the following comment on PHP.net and found it very troubling > because my database has Shift_JIS japanese words and my forms allow > japanese input as well, so, does anyone know how can I stripslashes > correctly when it comes to Ja

[PHP-DB] Shift_JIS Character Set

2003-12-11 Thread Ng Hwee Hwee
Hi, i've read the following comment on PHP.net and found it very troubling because my database has Shift_JIS japanese words and my forms allow japanese input as well, so, does anyone know how can I stripslashes correctly when it comes to Japanese text? thanx thanx! hash at samurai dot fm 01-De

[PHP-DB] Need HELP with UPDATE & DELETE

2003-12-11 Thread irinchiang
Hi all, Right now I'm trying to do a UPDATE and DELETE queries using the following code below: But i kept getting error "Undefined variable: tutor_id in /usr/local/apache/htdocs/tutor/edit.php on line . Didn't I defined my variable "$tutor_id"I thought I have... Anyone can help??? Tha

[PHP-DB] pg_result_error()

2003-12-11 Thread Gerard Samuel
What good is this function? A quick example of the wall Im running into -> $sql = 'INSERT INTO .'; $result = pg_query($conn_id, $sql); if ($result === false) { var_dump( pg_result_error( $result ) ); } According to the manual, pg_result_error takes the result resource. If that resource is

Re: [PHP-DB] Cronjob

2003-12-11 Thread John W. Holmes
Ryan Marks wrote: I have a cronjob that runs a PHP script against MySQL. The script takes 5 minutes to process 4000 records (approximately 12 records per second). Here are the top two entries from top: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 8671 mysql 25

[PHP-DB] Cronjob

2003-12-11 Thread Ryan Marks
Hello all, I have a cronjob that runs a PHP script against MySQL. The script takes 5 minutes to process 4000 records (approximately 12 records per second). Here are the top two entries from top: PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME CPU COMMAND 8671 mysql 25 0 2017

[PHP-DB] NEXTVAL Question

2003-12-11 Thread Paul Miller
Does anyone know how to make this work??? $sql = "select TEAM_SEQ.NEXTVAL as \"nextval\" from sys.dual"; I get the following error in PHP: ociexecute(): OCIStmtExecute: ORA-00903: invalid table name But when I use my SQL tool to hit the DB will all the same parameters, it works just fine. I ha

Re: [PHP-DB] Root-Server Firebird PHP

2003-12-11 Thread Lester Caine
My own install worked OK with RC4, but it may be worth a look through the firebird-php list as there are a few other 'fixes' listed. http://groups.yahoo.com/group/firebird-php I've pressure to complete a W2k based job before Xmas otherwise I would be having another look myself. I'm sure we nee

[PHP-DB] Grouping and ordering - tricky problem, suggestions welcome

2003-12-11 Thread Neil Smth
Hi All - I have a query as below, which builds individual records from a series of 4 tables SELECT menuitems.tour_code, image_caption, image_code, region, country, product_type FROM tourcountries, tour_product, countries, menuitems LEFT OUTER JOIN

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Justin Patrin
Martin Marques wrote: El Jue 11 Dic 2003 05:30, Mike U. Petrov escribió: I tried to use GROUP BY and it worked almost right but i need to return user_id and mysql generated an error that notes.user_id isn't used in GROUP BY... Add it to the GROUP BY. But he wants only one entry for user_id, no

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Martin Marques
El Jue 11 Dic 2003 05:30, Mike U. Petrov escribió: > I tried to use GROUP BY and it worked almost right but i need to return > user_id and mysql generated an error that notes.user_id isn't used in GROUP > BY... Add it to the GROUP BY. -- 16:33:02 up 15 days, 22:49, 4 users, load average: 0.03

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Martin Marques
El Jue 11 Dic 2003 05:17, Mike U. Petrov escribió: > No, DISTINCT isn't match my purpose cause of it rerurns unique rows but I > need ONE user_id per one object_id. GROUP BY is your answer. -- 15:51:02 up 15 days, 22:07, 3 users, load average: 0.90, 0.75, 0.61

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Martin Marques
El Jue 11 Dic 2003 05:00, Muhammed Mamedov escribió: > You can also DISTINCT command instead. > UNIQUE command isnot supported by mySQL (at least at MySQL 3.23.41- I am > using) UNIQUE is for table creation or index creation. It is relevent for insertion, not selects. DISTINCT and DISTINCT ON() a

[PHP-DB] Re: array

2003-12-11 Thread peppe
Hi Pete I forgot to write that $acces is a field from Db and there are values 1,2,3,4 a need to split those values to make that IF Brettking I think that is solution "Peppe" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > I have a variable cold $access and there are values 1,2,3

Re: [PHP-DB] array

2003-12-11 Thread peppe
Hi Pete I forgot to write that $acces is a field from Db and there are values 1,2,3,4 a need to split those values to make that IF Brettking thanx mate I think that is a solution "Brettking" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Hi > > From what I can work out you need t

RE: [PHP-DB] array

2003-12-11 Thread brettking
Hi >From what I can work out you need to use a function called in_array(value,array); http://www.php.net/manual/en/function.in-array.php here is the php manual link Hope this is what you want Brett -Original Message- From: peppe [mailto:[EMAIL PROTECTED] Sent: 11 December 2003 16:07 To:

[PHP-DB] Re: array

2003-12-11 Thread pete M
if($access ==2) { echo "do something"; } Peppe wrote: Hi I have a variable cold $access and there are values 1,2,3,4,5 How can I check for example If ($access =='2'){ echo "go further"; } How can I make this work Thanx in advance -- PHP Database Mailing List (http://www.php.net/) To unsubsc

[PHP-DB] array

2003-12-11 Thread peppe
Hi I have a variable cold $access and there are values 1,2,3,4,5 How can I check for example If ($access =='2'){ echo "go further"; } How can I make this work Thanx in advance -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Root-Server Firebird PHP

2003-12-11 Thread Frank Kieselbach
Hello, I have a root-server (Suse 8.1, PHP 4.2.2) and i will use firebird (1.5) with php. I have install firebird and create my database with tables and data. It works (isql). In the first step i will use firebird with the interbase.so. I do this: ../configure --with-interbase=shared,/opt/firebir

[PHP-DB] Re: SQL question

2003-12-11 Thread pete M
$query = "SELECT * FROM x_table WHERE name like '%part_of_name%' "; Constantin Brinzoi wrote: I know it is possible to search a database like this: SELECT * FROM x_table WHERE name="%part_of_name%" but I don't know for sure the correct command. Could you tell me the right syntax? TIA Aurel.

Re: [PHP-DB] SQL question

2003-12-11 Thread Muhammed Mamedov
I am sorry without equal "=" sign SELECT * FROM x_table WHERE name Like "%part_of_name%" there are actually three ways to do this: "%part_of_name%" part_of_name appears anywhere "%part_of_name"part_of_name appears at the end "art_of_name%" part_of_name appears at the begini

RE: [PHP-DB] SQL question

2003-12-11 Thread brettking
try SELECT * FROM x_table WHERE name LIKE "%part_of_name%" -Original Message- From: Constantin Brinzoi [mailto:[EMAIL PROTECTED] Sent: 11 December 2003 11:52 To: [EMAIL PROTECTED] Subject: [PHP-DB] SQL question I know it is possible to search a database like this: SELECT * FR

RE: [PHP-DB] SQL question

2003-12-11 Thread Ford, Mike [LSS]
On 11 December 2003 11:52, Constantin Brinzoi wrote: > I know it is possible to search a database like this: > > SELECT * FROM x_table WHERE name="%part_of_name%" > > but I don't know for sure the correct command. > > Could you tell me the right syntax? SELECT * FROM x_table WHE

Re: [PHP-DB] SQL question

2003-12-11 Thread Muhammed Mamedov
It should be as follows: SELECT * FROM x_table WHERE name Like = "%part_of_name%" Hope this helps, M.Mamedov - Original Message - From: "Constantin Brinzoi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 11, 2003 1:51 PM Subject: [PHP-DB] SQL question > I know it

[PHP-DB] SQL question

2003-12-11 Thread Constantin Brinzoi
I know it is possible to search a database like this: SELECT * FROM x_table WHERE name="%part_of_name%" but I don't know for sure the correct command. Could you tell me the right syntax? TIA Aurel. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP-DB] Slashes

2003-12-11 Thread Jason Wong
On Thursday 11 December 2003 17:27, Ng Hwee Hwee wrote: > can I know when does the magic_quotes_gpc start adding slashes and > stripping slashes? magic_quotes_gpc is for incoming GET/POST/Cookie data (NB it does not strip slashes) ... > I removed my EscapeShellCmd and my data is inserted and re

Re: [PHP-DB] password generator

2003-12-11 Thread Nikos Gatsis
Thanx you all guys, great tools indeed! - Original Message - From: "Roger Spears" <[EMAIL PROTECTED]> To: "php database" <[EMAIL PROTECTED]> Sent: Wednesday, December 10, 2003 6:33 PM Subject: Re: [PHP-DB] password generator > Here's one I've used recently with success > > http://w

Re: [PHP-DB] Slashes

2003-12-11 Thread Ng Hwee Hwee
Hi, can I know when does the magic_quotes_gpc start adding slashes and stripping slashes? I removed my EscapeShellCmd and my data is inserted and retrieved from the database just as i wanted. The problem now comes when I retrieve that data and immediately inserted them into another table.. then

RE: [PHP-DB] Re: Very complex query

2003-12-11 Thread Mike U. Petrov
I tried to use GROUP BY and it worked almost right but i need to return user_id and mysql generated an error that notes.user_id isn't used in GROUP BY... Mike U. Petrov -Original Message- From: Justin Patrin [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 11:25 AM To: [EMAIL

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Justin Patrin
Mike U. Petrov wrote: First, sorry my starnge way to post new thread. Second: I want to specify some features: in my table notes I've a lot of user_id's for each object_id and I don't want to find unique user_id, I only want to find one user_id for each object_id, so unique(user_id) doesn't match.

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Muhammed Mamedov
Give me exactly the sample table with data and show what you want there. I will try to help you. M.Mamedov - Original Message - From: "Mike U. Petrov" <[EMAIL PROTECTED]> To: "Muhammed Mamedov" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 11, 2003 10:17 AM Subject: R

RE: [PHP-DB] Re: Very complex query

2003-12-11 Thread Mike U. Petrov
No, DISTINCT isn't match my purpose cause of it rerurns unique rows but I need ONE user_id per one object_id. Mike U. Petrov -Original Message- From: Muhammed Mamedov [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 11:01 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: Very

Re: [PHP-DB] Re: Very complex query

2003-12-11 Thread Muhammed Mamedov
You can also DISTINCT command instead. UNIQUE command isnot supported by mySQL (at least at MySQL 3.23.41- I am using) Hope this helps, M.Mamedov - Original Message - From: "Justin Patrin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 11, 2003 9:52 AM Subject: [PH

RE: [PHP-DB] Re: Very complex query

2003-12-11 Thread Mike U. Petrov
First, sorry my starnge way to post new thread. Second: I want to specify some features: in my table notes I've a lot of user_id's for each object_id and I don't want to find unique user_id, I only want to find one user_id for each object_id, so unique(user_id) doesn't match. Do u have any other id

[PHP-DB] Re: Very complex query

2003-12-11 Thread Justin Patrin
Mike U. Petrov wrote: Hi every1! Excuse me for maybe offtopic but I need help on mysql database. I have 4 tables, and here are some important extractions from 'em: objects{ object_id; name; } users{ user_id; nick; date; } notes{ user_id; obje

[PHP-DB] Very complex query

2003-12-11 Thread Mike U. Petrov
Hi every1! Excuse me for maybe offtopic but I need help on mysql database. I have 4 tables, and here are some important extractions from 'em: objects{ object_id; name; } users{ user_id; nick; date; } notes{ user_id; object_id; } object_propert