[PHP] Re: syntax help
If you want to actually want the variables $flyertotal, $emailtotal, and $phonetotal, use the line: ${$array[0].total} = $row[0]; But as you defined $array, that will actually create the variables $Flyertotal, $Emailtotal, and $Phonetotal (note the caps). On 2/13/2004 6:10 AM, Bob pilly wrote: $array[$i].total=$row[0];-- problem here so for the above code i would like to create three variable $flyertotal,$emailtotal $phonetotal -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: syntax help~~~
Hi.. I just wanna laugh really want to laugh WUWUAHAHAHAHAHA I have figure out the solution amazingly! here will be the code I am running LoL ? mysql_connect('localhost','coconut','tkming') or die (Unable to connect to SQL Server); mysql_select_db('helpwatch') or die (Unable to select database); $temp = $username.watch ? ? $watchlist_query = mysql_query( Create Table .$temp. ( WId int auto_increment not null, QId int not null, Primary Key (WId) ) ) or die (Error! Cannot create table ! . mysql_error() ); ? I separated the query code with the database connection coding LoL after that.. its work! Thanks for everyone who help me :) Regards Kok Ming Arcadius A. wrote: Hello ! We could keep things simpler ... Why not give a try to this ?: $watchlist_query = mysql_query( Create Table $temp ( WId int Not Nullauto_increment, QId int not null, Primary Key (WId) ) ) or die (Error ! Cannot create table ! . mysql_error() ); Hope it would work :o) (At least the mysql_error() would show you the error code ) Arcad Coconut Ming [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi I am having the problem in the coding below ? mysql_connect('localhost','123','123') or die (Unable to connect to SQL Server); mysql_select_db('Helpwatch') or die (Unable to select database); $temp = $username.watch; $watchlist_query = mysql_query(Create Table $temp(WId int Not Null auto_increment, QId int not null, Primary Key (WId));); ? So.. in the above coding. I need to create a table. The table name should be a user-define name + watch I acquire the $username correctly and the variable $temp is working fine when I try to echo the value of it. Just say. I enter my username as coconut so I wish the mysql query to create a table called coconutwatch but I can't do that.. Because of the syntax error, the coding I have underline is where the parser told me that is an error there. I have playing around with it for 2 hours and more... but I cant solve it.. Anyway help is greatly appreciated. Thanks in advance. Sincerely Kok Ming -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: syntax help~~~
At 06.08.2001 10:31, you wrote: Hi.. I just wanna laugh really want to laugh WUWUAHAHAHAHAHA I have figure out the solution amazingly! here will be the code I am running LoL it works without separating the code if you add the ; at the end of the $temp = $username.watch line... ? mysql_connect('localhost','coconut','tkming') or die (Unable to connect to SQL Server); mysql_select_db('helpwatch') or die (Unable to select database); $temp = $username.watch ? ? $watchlist_query = mysql_query( Create Table .$temp. ( WId int auto_increment not null, QId int not null, Primary Key (WId) ) ) or die (Error! Cannot create table ! . mysql_error() ); ? -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: syntax help~~~
Hello ! We could keep things simpler ... Why not give a try to this ?: $watchlist_query = mysql_query( Create Table $temp ( WId int Not Nullauto_increment, QId int not null, Primary Key (WId) ) ) or die (Error ! Cannot create table ! . mysql_error() ); Hope it would work :o) (At least the mysql_error() would show you the error code ) Arcad Coconut Ming [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi I am having the problem in the coding below ? mysql_connect('localhost','123','123') or die (Unable to connect to SQL Server); mysql_select_db('Helpwatch') or die (Unable to select database); $temp = $username.watch; $watchlist_query = mysql_query(Create Table $temp(WId int Not Null auto_increment, QId int not null, Primary Key (WId));); ? So.. in the above coding. I need to create a table. The table name should be a user-define name + watch I acquire the $username correctly and the variable $temp is working fine when I try to echo the value of it. Just say. I enter my username as coconut so I wish the mysql query to create a table called coconutwatch but I can't do that.. Because of the syntax error, the coding I have underline is where the parser told me that is an error there. I have playing around with it for 2 hours and more... but I cant solve it.. Anyway help is greatly appreciated. Thanks in advance. Sincerely Kok Ming -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]