Monkuar Posted May 27, 2009 Share Posted May 27, 2009 Make's all posts/Topics at 0 So I dont have to go and edit each freaking row, lol See the topic and posts row? I want all of them to have 0 See.. ; database is called gzforums_ipb13 table is: ibf_forums how do i make a query? So I can make it all 0 posts Topics 0 thanks Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/ Share on other sites More sharing options...
Maq Posted May 27, 2009 Share Posted May 27, 2009 Like this: UPDATE ibf_forums SET topics = 0, posts = 0 Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843655 Share on other sites More sharing options...
MadTechie Posted May 27, 2009 Share Posted May 27, 2009 or with database name UPDATE `gzforums_ipb13`.`ibf_forums` SET `topics` = '0',`posts` = '0' DAME you Maq,, your too fast! Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843659 Share on other sites More sharing options...
Maq Posted May 27, 2009 Share Posted May 27, 2009 But yours is more elaborate. It handles selecting the correct database, escaping the table name (which isn't necessary) and takes into account if the 'posts' and 'topics' aren't INT fields with the single quotes. Well done Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843669 Share on other sites More sharing options...
MadTechie Posted May 27, 2009 Share Posted May 27, 2009 LOL i win one the database name Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843674 Share on other sites More sharing options...
Monkuar Posted May 28, 2009 Author Share Posted May 28, 2009 damn.. epic UPDATE ibf_forums SET topics = 0, posts = 0 thanks guys! Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843675 Share on other sites More sharing options...
Maq Posted May 28, 2009 Share Posted May 28, 2009 LOL i win one the database name Ahh yes, but I got the epic win!! Muhahahahaa. Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843677 Share on other sites More sharing options...
Ken2k7 Posted May 28, 2009 Share Posted May 28, 2009 You two are silly. Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843678 Share on other sites More sharing options...
MadTechie Posted May 28, 2009 Share Posted May 28, 2009 But do i get the last word ? monkuar Click solved if this is done Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843682 Share on other sites More sharing options...
Monkuar Posted May 28, 2009 Author Share Posted May 28, 2009 But do i get the last word ? monkuar Click solved if this is done my bad i forgot lol yea done thx now my forums look sexy Quote Link to comment https://forums.phpfreaks.com/topic/159956-solved-i-need-to-make-a-query-that/#findComment-843715 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.