[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: > Thank you, Richard, > > I simply change this part > (select * from openart_table) into > (select substring(loc1, 1, 3) as THREE_LETTER_CODE, * from openart_table) > but Ive got this error, whats wrong with it? > > Warning:

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

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

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 (