Re: [PHP-DB] button control

2002-09-06 Thread Gurhan Ozen
PHP is a server-side scripting language, there is no way for it to know what is going on client window, that's a job for Javascript. But if you are using them in a form you can give them name/value to use them as form variables which can be used in the form action. This is a general PHP

Re: [PHP-DB] Re: noobie db: oracle?

2002-09-06 Thread Gurhan Ozen Gurhan On Fri, 2002-09-06 at 04:26, :B nerdy wrote: anyone know anything about oracle php at all? =D :B Nerdy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ive been using mysql my whole php life. i

Re: [PHP-DB] MySQL order by in greek

2002-09-05 Thread Gurhan Ozen
Hi you have to restart your mysqld server with --default-character-set=greek option. You can either do this by explicitly giving it in the command line when restarting your mysqld, or you can add that line to your global my.cnf file. See:

Re: [PHP-DB] Column count error?

2002-07-26 Thread Gurhan Ozen
Did you copy and paste the code? There is no such function as mysql_numrows, it has to be mysql_num_rows.. I don't know why you didn't get an error for it? Gurhan Jas [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am not sure how to resolve this type of

[PHP-DB] Connecting to a second MySQL server(4.0.2) thru the socket...

2002-07-13 Thread Gurhan Ozen
Does everyone have any experiences connecting to MySQL 4.0.2 through the socket ? Here is the deal, I have just installed MySQL 4.0.2 as the second mysqld server on my linux machine, and , to specify which mysql to connect to , I am trying to connect to 4.0.2 via socket in PHP, i.e.

Re: [PHP-DB] Mysql syntax error - phpMyAdmin ??

2002-07-10 Thread Gurhan Ozen
Hi, No you should not report it to anyone. Reserved words can be used as column names in MySQL (although you shouldn't) provided that they are surrounded by backticks. When you do it in phpMyAdmin, phpMYAdmin is putting everything inside backticks , so that this problem won't be encountered. See:

RE: [PHP-DB] MySQL Problem

2002-05-21 Thread Gurhan Ozen
That means PHP is not compiled with the MySQL support... Configure it with mysql support, I bbelieve there were a lot of questions about this in the list, so you may wanna search the archives.. Gurhan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: [PHP-DB] Zeropadding

2002-05-14 Thread Gurhan Ozen
SELECT LPAD(column_name, '6', '0') FROM table_name; Gurhan -Original Message- From: Morten Nielsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 4:24 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Zeropadding Hi, I use MySQL where I have a table. One of the fields is an INT(6),

RE: [PHP-DB] mssql_fetch_array not working?

2002-05-13 Thread Gurhan Ozen
response. Gurhan Ozen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi ... Get rid of the if($rs) block... Just do: while ($row = mssql_fetch_array($rs)); { echo $row[ItemClassKey]; echo br; } Gurhan -Original Message---

RE: [PHP-DB] mssql_fetch_array not working?

2002-05-13 Thread Gurhan Ozen
PM To: Gurhan Ozen Cc: Benjamin Walling; [EMAIL PROTECTED] Subject: Re: [PHP-DB] mssql_fetch_array not working? Do I see a semicolon at the end of the while? that won't work... On Monday, May 13, 2002, at 04:35 PM, Gurhan Ozen wrote: while ($row = mssql_fetch_array($rs)) _;_ should

RE: [PHP-DB] Wildcards

2002-05-06 Thread Gurhan Ozen
That query doesn't make sense... All you are looking for is to get a resultset containing ONLY the rows where name is John. So, just write: SELECT ID, NAME, ADDRESS FROM users WHERE NAME='John'; By the way, in SQL, the wildcard character for regular expressions is the '%' not '*' . Gurhan

RE: [PHP-DB] Simple search engine gone bad

2002-04-29 Thread Gurhan Ozen
Jenn, Get rid of 'value=\\' in your code and give it a shot again... Gurhan -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Monday, April 29, 2002 9:32 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Simple search engine gone bad Hi all, It's Monday, it's

RE: [PHP-DB] drop list inserts

2002-04-18 Thread Gurhan Ozen
'( I've got this), I want the id of the artist they selected in the drop list to be inserted into the table 'music_album' as $artist_id. -Original Message- From: Gurhan Ozen [EMAIL PROTECTED] To: Barry Rumsey [EMAIL PROTECTED], php-db list php- [EMAIL PROTECTED] Date: Wed, 17 Apr 2002 19:02:52

RE: [PHP-DB] appending new entry to old entries

2002-04-18 Thread Gurhan Ozen
Ron, Are we talking about appending new values to the database tables? If yes, you need to use INSERT INTO ... VALUES syntax ... If you mean to append the new values to a file , then you need to open the file in a mode. Gurhan -Original Message- From: Ron Allen [mailto:[EMAIL

RE: [PHP-DB] What is mysql error 28?

2002-04-17 Thread Gurhan Ozen
Hi Leif, Anytime you get an MySQL error code number use perror program to see what it is.. [root@atsiz /root]# perror 28 Error code 28: No space left on device It seems like you don't have enough space to write to your table. Gurhan -Original Message- From: Leif K-Brooks

RE: [PHP-DB] drop list inserts

2002-04-17 Thread Gurhan Ozen
Hi Barry, First of all, $query_id = mysql_query(INSERT INTO...); is wrong. That line will just assign the resultset of the whatever mysql_query() function returns to the variable $query_id .. Get rid of $query_id and just have mysql_query(INSERt INTO ); See:

RE: [PHP-DB] Delete from mysql table is there a way to....

2002-04-16 Thread Gurhan Ozen
The tables gets fragmented as deletions, updates take place on a table. If the DB operations get slower on a table, there is a good possibility that the table has been fragmented.. If you are using MySQL , you can use CHECK TABLE or myisamchk periodically to check your tables. See:

RE: [PHP-DB] Cross DB application

2002-04-15 Thread Gurhan Ozen
Hi Arcadius, If you know Object-oriented programming , you can write a class that includes both MySQL and PostGreSQL functions and you can inherit from that class. Or, you can just stick all mysql, postgresql functions in a functions.php file and include that file to be able to use the functions.

RE: [PHP-DB] how to change a column to ENUM

2002-04-07 Thread Gurhan Ozen
Hi Andy, That statement won't work because you have to provide the possible values for the enum colummn. Say you can only have Y or N or that field, that you need to type: ALTER TABLE `test` CHANGE `field` `field` ENUM('Y','N'); By the way, if you have 250 different possible entries , I would

RE: [PHP-DB] help with insert needed

2002-04-07 Thread Gurhan Ozen
Hi Djordie, You need to have the connection to the DB in your php script leksikon_in.php . Gurhan -Original Message- From: Djordje Gacesa [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 9:44 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] help with insert needed Hello, everybody!

RE: [PHP-DB] Regular Expressions

2002-04-07 Thread Gurhan Ozen
What are you trying to do? an where is your pattern? are you trying to match any character followed by 2 to 20 any characters in the $string variable? Gurhan -Original Message- From: Ilhan Guvener [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 11:33 AM To: [EMAIL PROTECTED]

RE: [PHP-DB] How to link a MYSQL table to a dbase file

2002-04-04 Thread Gurhan Ozen
/1005/fid/436 Gurhan Ozen MCI WorldCom Quality Assurance Team [EMAIL PROTECTED] ph: 703-449-4754 Vnet: 228-4754 AIM: Greywolf1923 -Original Message- From: Marij Bellen [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:57 AM To: Php-Db@Lists. Php.Net (E-mail) Subject: Re: [PHP


2002-03-28 Thread Gurhan Ozen
I don't know if you can do in one INSERT INTO statements per se in Oracle, try to separate insert into statements with semicolon(;) .. Or if you will insert the data that is already in another table you can use INSERT INTO ... SELECT ... FROM ... syntax. Gurhan -Original Message-

RE: [PHP-DB] MySQL, PHPand cron

2002-03-28 Thread Gurhan Ozen
Hi Jenn, There are a couple ways you can do this. You can write a unix shell script and run it periodically at the cron. Here: #!/bin/mysql query=DELETE FROM tablename /usr/bin/mysql -u USER -pPASSWORD -D database -e $query And then you can just put this script into cron, see:

RE: [PHP-DB] Filesystem functions and mysql

2002-03-19 Thread Gurhan Ozen
Hello Tom, First of all, since you are keeping the filepaths and filenames you don't need to worry about any of the filesystem functions.. You just need to replace variables in the right places in your output HTML code. As for how to implement what you need, I will give you a different tip.

RE: [PHP-DB] Need Help with returning new id's

2002-03-19 Thread Gurhan Ozen
Hi, Did you copy and paste your code?IF yes, I have noticed a problem on the code you posted.. Y The line: $run_query = ($maxid,$db_connect); will fail as you didn't put the function name in. Rewrite it as: $run_query = mysql_query($maxid,$db_connect); Gurhan -Original Message-

RE: [PHP-DB] SQL statement - PHP/mySQL - brain fart

2002-03-18 Thread Gurhan Ozen
ok it is 1:37 am here and i have been up since 6:00 am (the day before) and have to be awake ths mornign again at 6:00 am so if I make any mistakes trying to answer your question, please take it easy:) I was wondering if you'd wanna use temporary tables to accomplish it.. You may wanna do:

RE: [PHP-DB] Is there a better way to do this?

2002-03-15 Thread Gurhan Ozen
Hi, Why don't you add another column to your items table for the item name..Then you can just fetch each row to an array and call it by $row[item_name] ? For better explanation: Say you added a column to hold item names in your items table called item_name ... I have no idea how you query

RE: [PHP-DB] DB Class pointer as var in another class

2002-03-14 Thread Gurhan Ozen
Hi Gary, I didn't understand what you were actually trying to do here.. You stated that Our goal here is to minimize the number of database connections per function call. but seems like you are connecting to the database in the constructor? So each instance will automatically connect to the DB??

RE: [PHP-DB] SQL Question

2002-03-13 Thread Gurhan Ozen
you can do it by using distinct function .. Do: SELECT DISTINCT(city) FROM addresses; Gurhan -Original Message- From: Kevin Diffily [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 2:05 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQL Question Hello, I have a simple SQL

RE: [PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Gurhan Ozen
are you just looking for a way to display 10 results per page? If yes then you can just use LIMIT to limit your result to 10 .. So, for the first page, you can do SELECT LIMIT 1, 10; and for the second page SELECT ... LIMIT 11, 20 etc etc . You can sure use ORDER BY with LIMIT to to sort


2002-03-13 Thread Gurhan Ozen
Hi Jane, No questions are lame. The statement you wrote down wouldn't work as IFNULL() function doesn't work the way you intended. See for this.. I would accomplish it in two statements. Here it is: SELECT (@a:=(CASE box1 WHEN '' THEN

RE: [PHP-DB] Is this possible in mysql?

2002-03-08 Thread Gurhan Ozen
Leif, IF i understood this correctly you would like to add up the values of a particular column and return it to PHP with a different name right? You can do: $query=select sum(column_name) as nameyouwant from tablename; // this will return the sum of the column in a column called nameyouwant

RE: [PHP-DB] I have a in my db ?

2002-03-06 Thread Gurhan Ozen
Hi, Can u please give us more information?? Are you trying to insert data into database or pull data out of database.. Also can you show the queries you are using??? Thanks, Gurhan -Original Message- From: Dave carrera [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 06, 2002 12:38 PM

RE: [PHP-DB] Difficulty on how to extract data out of a text withstring functions.

2002-03-06 Thread Gurhan Ozen
and osx to do this. The question is what would be the fastest way. I never heared of unix shell scripting, but I asume it is something what youwould call a batch file in win or apple script on mac. Thanx again for your help. Andy Gurhan Ozen [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL

RE: [PHP-DB] Parse error

2002-02-21 Thread Gurhan Ozen
Hi Jenn, The code looked ok to me , so I copied and pasted the code you posted and it worked for me.. Where are you getting the parsing error? Is it the whole code anyway? Gurhan -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 9:33

RE: [PHP-DB] Help on PHP vs JAVA

2002-02-21 Thread Gurhan Ozen
That's a pretty naive question to ask. For what specific task do you want to compare them ? Besides if you can't write a comparison article on PHP vs. JAVa , how can you set the outcome in PHP's favor? I would advise you to sit down and try to do the task both in Java and PHP , and compare both

RE: [PHP-DB] Parse Error

2002-02-21 Thread Gurhan Ozen
Not enough information given to figure out what's going on, but looking at your query i see: WHERE $cars = $car_type\,\$car_model\,\$car_year\,\$car_price\,\$car_vin\,\$dlr _num\); do you keep 6 different values separated by commas in the field referenced by $cars??? If this is correct what

RE: [PHP-DB] Parse Error

2002-02-21 Thread Gurhan Ozen
Jas.. First of all you don't have the variable $cars assigned.. Second of all, we still don't know what the test table looks like? Does it only have one column with all the infos about cars populated in it??? Gurhan -Original Message- From: jas [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP-DB] Parse Error

2002-02-21 Thread Gurhan Ozen
) test VALUES ('1', 'Ford', 'Bronco', '1969', '4500', 'vin897655', 'none'); Sorry about that... still a bit of a newbie here. =) Jas Gurhan Ozen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Jas.. First of all you don't have the variable $cars assigned..

RE: [PHP-DB] Errors Deleting...

2002-02-21 Thread Gurhan Ozen
Jas, You still have cars as your checkbox name.. change it to id.. and make sure that you assign $table_name to the table name you want to delete from in your done2.php3 file.. Gurhan -Original Message- From: jas [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 3:28 AM To:

RE: [PHP-DB] mysql and auto_increment

2002-02-20 Thread Gurhan Ozen
Yes you sure can,.. When you insert a row just use one of the older values that no longer exists on the table.. Alternatively, you can insert a blank value, mysql will automatically set it to the next value after the highest one in the table and then you can update it to one of the older values.

[PHP-DB] RE: Logging visits using a database

2002-02-13 Thread Gurhan Ozen
Hi I have never used it but sounds like analog would fit your needs pretty well. Check them out at: Hope this helps.. Gurhan -Original Message- From: Peter Lovatt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 6:29 PM To: [EMAIL

RE: [PHP-DB] Select rows where ?

2002-02-12 Thread Gurhan Ozen
SELECT * FROM table WHERE COLUMN_NAME NOT LIKE '%unwanted_String%'; when the field type is number you can use SELECT * FROM table WHERE COLUMN_NAME != unwanted_number; or SELECT * FROM table WHERE COLUMN_NAME unwanted_number; Gurhan -Original Message- From: Dave Carrera

RE: [PHP-DB] Converting upper case letters to lower case because ofdb??

2002-02-07 Thread Gurhan Ozen
Andy, You can do it with PHP's strtolower() function.. See: Gurhan -Original Message- From: Andy [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 11:08 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Converting upper case

RE: [PHP-DB] if variable is equal to 2 through 4

2002-02-06 Thread Gurhan Ozen
if ( ($variable 1 ) ($variable 5) ) echo hello; or alternatively, for ($i=2; $i 5; $i++) { if ($variable=$i) echo hello; } Gurhan Ozen MCI WorldCom Quality Assurance Team [EMAIL PROTECTED] ph: 703-449-4754 Vnet: 228-4754 1-800-PAGE-MCI pin: 1927052 AIM

RE: [PHP-DB] MySQL connect

2002-02-04 Thread Gurhan Ozen
mysql_connect() function only takes 3 arguments (servername, username, pass) . Select your database by using mysql_select_db() function... Try to rewrite the code as: mysql_connect($db[host],$db[user],$db[password]); mysql_select_db($db[database]); Refer to:

RE: [PHP-DB] Update

2002-02-04 Thread Gurhan Ozen
Try it without quotes around days_member and 1. Gurhan -Original Message- From: Jennifer Downey [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 4:51 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Update Hi, I am having problems with this code. I want to update a members

RE: [PHP-DB] Update

2002-02-04 Thread Gurhan Ozen
Yeah I didn't notice that.. VALUES must not be there . it should be : set days_member=days_member+1 thanks for pointing that out:) Gurhan -Original Message- From: Lokesh Verma [mailto:[EMAIL PROTECTED]] Sent: Monday, February 04, 2002 5:12 PM To: Gurhan Ozen Subject: Re: [PHP-DB

RE: [PHP-DB] DB Connections

2002-01-31 Thread Gurhan Ozen
Jas... What errors are you getting? What do you have inside your file? Do you have the path for inside the require() function correct? Give us more insights to be able to find out what the problem is.. Gurhan -Original Message- From: jas

RE: [PHP-DB] MySQL Connection Class

2002-01-30 Thread Gurhan Ozen
in the functions $db = mysql_connection(localhost,username,password) or die(could not connect); and then put an include statement on the top of each page that needs the db connectiong? Please correct me if I am wrong, I have never really used class files for my own scripts before. Thanks again. Gurhan

RE: [PHP-DB] arrays and email

2002-01-29 Thread Gurhan Ozen
Hi kevin, Seems like in your while loop, you are not populating your list array correctly with all the emails you have. Try to have a count value and populate the array list accordingly such as: $count = 0; while ($row = mysql_fetch_row($result)) { $real_name = $row[1];

RE: [PHP-DB] [PHP] PHP and MYSQL Security`

2002-01-27 Thread Gurhan Ozen
The actual content of the .php files won't be seen from the net since it is server side scripting language.. But if you are still concerned you can put database connection info into another file (preferably .php file) and place it somewhere outside your web directory and access it thru require()

RE: [PHP-DB] Another dynamic sql.

2002-01-25 Thread Gurhan Ozen
Seems like it will NOT work because you are selecting $car which is already chosen by the user (i.e. which is a known value). I don't know how you laid out your table but shouldn't your query be something like SELECT price from FROM varetabell where carid=$car ?? Gurhan -Original

RE: [PHP-DB] fwrite()

2002-01-25 Thread Gurhan Ozen
You don't have anything to write to the file.. mysql_query() function returns true or false, it doesn't return the actual qurey result you'd see in mysql monitor. You have to use some other functions such as mysql_fetch_array(), mysql_num_rows() to retrieve the data before you can write it into a

RE: [PHP-DB] fwrite()

2002-01-25 Thread Gurhan Ozen
Jamie, The main problem here is , you are selecting the rows that are some null values. mysql_fetch* doesn't return any null columns. Yes, you read it right, if you have a table with say, 5 columns and if 3 columns in a row are null then you'll only have 2 columns that are not null . Make sure

RE: [PHP-DB] Pictures+MySQL+PHP

2002-01-25 Thread Gurhan Ozen
Kamil, If getting info in your private email is making you so pleased maybe you shoudl never post any questions here, it is contradictory to the philisophy of the list. I have also asked about inserting / retrieving pictures in mysql database in past and I have received so many con replies that

RE: [PHP-DB] Save generated page locally

2002-01-25 Thread Gurhan Ozen
Hi Howard, I didn't fully understand your question.. Wouldn't you rather have the server upload the file automatically without asking the user where to save it? You can do it by using PHP's FTP functions.. See: Gurhan -Original Message- From:

RE: [PHP-DB] help plz

2002-01-25 Thread Gurhan Ozen
Hi Shelly, It is just the old trick. You can get the time at the beginning of the page and at the end of the page and just calculate the difference in between two. Since the default timeout value in PHP is 30secs. it will probably be a short timeperiod so you can probably you use time() function

[PHP-DB] any good web hosting with php and mysql support?

2002-01-14 Thread Gurhan Ozen
Hi All, I am currently looking for a reliable web host to host my personal website. I know there are millions of web hosting companies that have PHP and MYSQL support but I just can't trust any of the fully-assured and confident webhosting ads anymore. I would like to get a service from a

RE: [PHP-DB] mysql_num_rows

2002-01-06 Thread Gurhan Ozen
, 2002 3:01 PM To: Gurhan Ozen; [EMAIL PROTECTED] Subject: Re: [PHP-DB] mysql_num_rows It would help if we could see the actual query. It sounds like the problem is a syntax error in the query itself. At 11:52 AM 1/6/2002, Gurhan Ozen wrote: Hi everyone, I have a problem with mysql

RE: [PHP-DB] mysql_num_rows

2002-01-06 Thread Gurhan Ozen
Message- From: Richard S. Crawford [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 06, 2002 3:34 PM To: Gurhan Ozen; [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql_num_rows Hm, if the result you want is the number of distinct nodeid values, why not use a query like this: select count(distinct