[PHP-DB] Select distinct field won't return distinct value

2006-06-06 Thread Mohamed Yusuf
I want select distinct field and return value of that field, but I have problem which is: select distinct returns duplicate value. eg, I wan select distinct customer name and id from the customer table. one customer may have different cus_ids since cus_ids are auto increment and depend on the

Re: [PHP-DB] Select distinct field won't return distinct value

2006-06-06 Thread Mohamed Yusuf
I thank you all. problem solved using two queries as TQ mentioned. On 6/6/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Correct me if I'm wrong, but it sounds like you have something like this: 123 Joe 124 Joe 125 Sue 126 John 127 Joe 128 Frank 129 Sue And you want to output

[PHP-DB] Need a Help!

2005-12-12 Thread Mohamed Yusuf
I have table and insert data using song_id, that means one artist can have many song_ids. my question is how can I query distinct artist with his/her song_id while I will not get duplicate data like duplicate artist? my code is like this $content .=form id=\form1\ method=\post\ action=\\ select

Re: [PHP-DB] problem of retrieving urls from mysql

2005-12-07 Thread Mohamed Yusuf
Bastien Koert [EMAIL PROTECTED] 12/06/05 1:44 PM $url = str_replace(www.mydomain.com,,$url) bastien From: Mohamed Yusuf [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] problem of retrieving urls from mysql Date: Tue, 6 Dec 2005 09:51:18 -0800 I would like to store

[PHP-DB] problem of retrieving urls from mysql

2005-12-06 Thread Mohamed Yusuf
I would like to store and retrieve urls, but I have problem which is I get my url + the other url, Instead I should get another url only $temp = linkurl; echo $temp; the echo prints something like this http://www.mydomain.com/www.otherlink.com so I wan get rid off my url and get only other

[PHP-DB] problem of transmitting variable from page to another page.

2005-12-02 Thread Mohamed Yusuf
I am transmitting variable from one of my pages and I would like to match that variable into mysql data. it won't return data. my code is this. ?php for ($j=A; $j = Z; $j++) { echo | ba href='alpha.php?artist=$j'$j/a/b |; if ($j == Z) { break; } } ? this code in my index page prints

[PHP-DB] php upload

2005-11-21 Thread Mohamed Yusuf
I heard that the maximum file size which php can upload is setted to 2MB, so is it a possible to reset the maximum_file_size to a larger bytes and if it is possible how can I achieve that?

[PHP-DB] Can't Upload ram file

2005-11-18 Thread Mohamed Yusuf
the script I am using can upload images like, jpg, gif or png to the server, but it can't upload music file to the server like ram and rm. any help?

Re: [PHP-DB] Can't Upload ram file

2005-11-18 Thread Mohamed Yusuf
; } ? On 11/18/05, Bastien Koert [EMAIL PROTECTED] wrote: show code, maybe checks are being done to only allow images or certain extensions... Bastien From: Mohamed Yusuf [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Can't Upload ram file Date: Fri, 18 Nov 2005 06:19:24

Re: [PHP-DB] Can't Upload ram file

2005-11-18 Thread Mohamed Yusuf
brFile uploadedbr; } ? On 11/18/05, Bastien Koert [EMAIL PROTECTED] wrote: show code, maybe checks are being done to only allow images or certain extensions... Bastien From: Mohamed Yusuf [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Can't Upload ram file Date: Fri, 18 Nov

[PHP-DB] Problem of Upload media file

2005-11-17 Thread Mohamed Yusuf
I am trying to upload music file to server using php and saving file path to the MySql, But I am getting this error message *Warning*: move_uploaded_file(music/media/): failed to open stream: No such file or directory in */home/somally/public_html/music/upload2.php* on line *36*. line 36 is

Re: [PHP-DB] Problem of Upload media file

2005-11-17 Thread Mohamed Yusuf
the permissions are right, I mean they are all setted to 777. On 11/17/05, Bastien Koert [EMAIL PROTECTED] wrote: Check your permissions on the folder...you may need to make them 777 to allow read/write by all for the upload Bastien From: Mohamed Yusuf [EMAIL PROTECTED] To: php-db

Re: [PHP-DB] Problem of Upload media file

2005-11-17 Thread Mohamed Yusuf
/public_html/music/music/media/ Which doesn't sound like what you intend. Also don't trust the php line numbers if you have significant whitespace in your code, sometimes it can get screwey. Look for your move_uploaded_file statement. -Micah On Thursday 17 November 2005 8:58 am, Mohamed Yusuf wrote

Re: [PHP-DB] Problem of Upload media file

2005-11-17 Thread Mohamed Yusuf
, Micah Stevens [EMAIL PROTECTED] wrote: Well, the error doesn't match the code, but the code says to upload the file to: /home/somally/public_html/music/www/media/ Is that correct? On Thursday 17 November 2005 9:41 am, Mohamed Yusuf wrote: here is the complete code, so you can check

Re: [PHP-DB] Problem of Upload media file

2005-11-17 Thread Mohamed Yusuf
Many thanks for your help. it works. On 11/17/05, Micah Stevens [EMAIL PROTECTED] wrote: No. It's not okay.. you're already in the music directory.. if you want it in the media subdir, just put 'media/' On Thursday 17 November 2005 10:40 am, Mohamed Yusuf wrote: so should I change

[PHP-DB] text with html tags apeared in text area.

2005-10-28 Thread Mohamed Yusuf
hi I have php form. one of my textarea gets data with html tags from database, so I would like to remove those html tags like br /, therefore is there anyway that i can remove those tags in the data and then the data can appear as text in the textarea.