4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 Storing and displaying stats
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Kdawg
Senior WebHelper
Senior WebHelper


Joined: 21 Apr 2003
Posts: 153

PostPosted: Fri Apr 25, 2003 8:35 pm (14 years, 6 months ago) Reply with QuoteBack to Top

Can someone look at this and tell me the problem, I get the error: Create table Error: You have an error in your SQL syntax near '' at line 1
Code:
<?php
$db = mysql_connect("","","");
mysql_select_db("",$db);
mysql_query("CREATE TABLE Robinson_Stats( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), Westlake_ab INT(5), Westlake_sng INT(5), Westlake_dbl INT(5), Westlake_tpl INT(5), Westlake_hr INT(5), Westlake_wlk INT(5), Westlake_stk INT(5), Westlake_ba INT(5), Westlake_hbp INT(5), Westlake_scf INT(5), Parma_ab INT(5), Parma_sng INT(5), Parma_dbl INT(5), Parma_tpl INT(5), Parma_hr INT(5), Parma_wlk INT(5), Parma_stk INT(5), Parma_ba INT(5), Parma_hbp INT(5), Parma_scf INT(5), Bedford_Away_ab INT(5), Bedford_Away_sng INT(5), Bedford_Away_dbl INT(5), Bedford_Away_tpl INT(5), Bedford_Away_hr INT(5), Bedford_Away_wlk INT(5), Bedford_Away_stk INT(5), Bedford_Away_ba INT(5), Bedford_Away_hbp INT(5), Bedford_Away_scf INT(5), Copley_Away_ab INT(5), Copley_Away_sng INT(5), Copley_Away_dbl INT(5), Copley_Away_tpl INT(5), Copley_Away_hr INT(5), Copley_Away_wlk INT(5), Copley_Away_stk INT(5), Copley_Away_ba INT(5), Copley_Away_hbp INT(5), Copley_Away_scf INT(5), Brecksville_Home_ab INT(5), Brecksville_Home_sng INT(5), Brecksville_Home_dbl INT(5), Brecksville_Home_tpl INT(5), Brecksville_Home_hr INT(5), Brecksville_Home_wlk INT(5), Brecksville_Home_stk INT(5), Brecksville_Home_ba INT(5), Brecksville_Home_hbp INT(5), Brecksville_Home_scf INT(5), Independence_ab INT(5), Independence_sng INT(5), Independence_dbl INT(5), Independence_tpl INT(5), Independence_hr INT(5), Independence_wlk INT(5), Independence_stk INT(5), Independence_ba INT(5), Independence_hbp INT(5), Independence_scf INT(5), Parma_#2_ab INT(5), Parma_#2_sng INT(5), Parma_#2_dbl INT(5), Parma_#2_tpl INT(5), Parma_#2_hr INT(5), Parma_#2_wlk INT(5), Parma_#2_stk INT(5), Parma_#2_ba INT(5), Parma_#2_hbp INT(5), Parma_#2_scf INT(5), North_Royalton_Home_ab INT(5), North_Royalton_Home_sng INT(5), North_Royalton_Home_dbl INT(5), North_Royalton_Home_tpl INT(5), North_Royalton_Home_hr INT(5), North_Royalton_Home_wlk INT(5), North_Royalton_Home_stk INT(5), North_Royalton_Home_ba INT(5), North_Royalton_Home_hbp INT(5), North_Royalton_Home_scf INT(5), Cloverleaf_Home_ab INT(5), Cloverleaf_Home_sng INT(5), Cloverleaf_Home_dbl INT(5), Cloverleaf_Home_tpl INT(5), Cloverleaf_Home_hr INT(5), Cloverleaf_Home_wlk INT(5), Cloverleaf_Home_stk INT(5), Cloverleaf_Home_ba INT(5), Cloverleaf_Home_hbp INT(5), Cloverleaf_Home_scf INT(5), Middleburg_Heights_ab INT(5), Middleburg_Heights_sng INT(5), Middleburg_Heights_dbl INT(5), Middleburg_Heights_tpl INT(5), Middleburg_Heights_hr INT(5), Middleburg_Heights_wlk INT(5), Middleburg_Heights_stk INT(5), Middleburg_Heights_ba INT(5), Middleburg_Heights_hbp INT(5), Middleburg_Heights_scf INT(5), North_Olmsted_ab INT(5), North_Olmsted_sng INT(5), North_Olmsted_dbl INT(5), North_Olmsted_tpl INT(5), North_Olmsted_hr INT(5), North_Olmsted_wlk INT(5), North_Olmsted_stk INT(5), North_Olmsted_ba INT(5), North_Olmsted_hbp INT(5), North_Olmsted_scf INT(5))")or die("Create table Error: ".mysql_error());
?>
OfflineView User's ProfileFind all posts by KdawgSend Personal Message
Kdawg
Senior WebHelper
Senior WebHelper


Joined: 21 Apr 2003
Posts: 153

PostPosted: Fri Apr 25, 2003 9:25 pm (14 years, 6 months ago) Reply with QuoteBack to Top

I found out the problem, it doesnt like the # Wink
OfflineView User's ProfileFind all posts by KdawgSend Personal Message
Kdawg
Senior WebHelper
Senior WebHelper


Joined: 21 Apr 2003
Posts: 153

PostPosted: Fri Apr 25, 2003 9:40 pm (14 years, 6 months ago) Reply with QuoteBack to Top

Is there a way to set all rows in a table to 0?
OfflineView User's ProfileFind all posts by KdawgSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Sat Apr 26, 2003 7:28 am (14 years, 6 months ago) Reply with QuoteBack to Top

Yes, there is, but AFAIK you have to name each row:

Code:
$sql = "UPDATE tablename SET row = 0, row = 0";

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   


Go to page Previous  1, 2

You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.048019 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme