[PHP] Re: Thanks but problem again! Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Satyam
I think that in your database it is : substring(loc, 1, 3) as loc1 Anyway, the error is not where you are getting the message, the query failed and this you don't have a valid resource to ask the number of rows or do anything else. You should add an 'or die("message: " . mysql_error()) to you

Re: [PHP] Thanks but problem again! Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Petar Nedyalkov
On Wednesday 20 April 2005 06:07, Sugimoto wrote: (B> Thank you, Richard, (B> (B> I simply change this part (B> (select * from openart_table) into (B> (select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table) (B> but Ive got this error, whats wrong with it? (B> (B> Warning:

[PHP] Thanks but problem again! Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Sugimoto
Thank you, Richard, (B (BI simply change this part (B(select * from openart_table) into (B(select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table) (Bbut Ive got this error, whats wrong with it? (B (BWarning: mysql_num_rows(): supplied argument is not a valid MySQL result (B

Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Richard Lynch
[Connective issues may make this a duplicate post. Sorry.] On Tue, April 19, 2005 6:25 pm, Sugimoto said: > What I do like to do is to get first 3 letters from "loc1" column from openart_table (MySQL). select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table ... -- Like Music? h

Re: [PHP] PHP script problem (with MySQL)

2005-04-19 Thread Richard Lynch
On Tue, April 19, 2005 6:25 pm, Sugimoto said: > What I do like to do is to get first 3 letters from "loc1" column from > openart_table (MySQL). select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table ... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (

[PHP] PHP script problem (with MySQL)

2005-04-19 Thread Sugimoto
Hello, (BI need your help about PHP (ver 4.3.1) and MySQL (ver 3.23) database. (BI am struggling to customise a database (using left command etc), and am (Bstuck now. (BPlease have a brief look at my scripts below. (B (BWhat I do like to do is to get first 3 letters from "loc1" column from (