Join Our Green Bay Packers Interactive Community!

We have been providing fans with the best source of Packers information since 2006!
Your participation is greatly anticipated!
Login or Register.
2 Pages<12
Options
View
Go to last post Go to first unread
Offline dhpackr  
#16 Posted : Friday, October 22, 2010 10:53:44 PM(UTC)
dhpackr

Rank: 4th Round Draft Pick

Joined: 12/12/2007(UTC)

Applause Given: 36
Applause Received: 36

Code:

&lt;?php

// $delete_query = "DELETE ?????FROM posts WHERE id='$postID'";
        // mysql_query($delete_query);
        $nonmemberposts++;    
?&gt;


wouldn't work if it wasn't commented out, this would cause an error, not telling what you want to delete.

why don't you just delete id #2, the whole row? if you are using auto increment for the id field, it wouldn't let you delete the row unless you delete the id
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
Offline Zero2Cool  
#17 Posted : Friday, October 22, 2010 10:58:03 PM(UTC)
Zero2Cool

Rank: Legend

Yahoo! Fantasy Football - Gold: 2009FleaFlicker Fantasy Football - Silver: 2010Yahoo! NCAA March Madness - Silver: 2011ESPN NCAA March Madness - Bronze: 2010Yahoo! NCAA March Madness - Bronze: 2013

United States
Joined: 10/13/2006(UTC)
Location: Green Bay, WI

Applause Given: 1,911
Applause Received: 2,117

I've deleted members in the users table, but not their posts. Therefore there's posts out there that cause errors while searching.
UserPostedImage
Offline dhpackr  
#18 Posted : Friday, October 22, 2010 11:23:58 PM(UTC)
dhpackr

Rank: 4th Round Draft Pick

Joined: 12/12/2007(UTC)

Applause Given: 36
Applause Received: 36

imo, the best way to maintain your site would be to manually go into the database through php admin and delete the rows that way.

a script would be nice for maintenance, but you are risking wiping out data you want to keep.

just wondering, did you join the mysql forum. you should, and post questions in the forum.

you'll get your solution...if you are driven.

BTW..I find it humorous, a .NET Developer is running his forum using PHP, Microsoft's main nemesis.

Isn't that like sayin you work at Ford but drive a Toyota?

:icon_smile: just sayin!
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
Offline Zero2Cool  
#19 Posted : Saturday, October 23, 2010 12:08:55 AM(UTC)
Zero2Cool

Rank: Legend

Yahoo! Fantasy Football - Gold: 2009FleaFlicker Fantasy Football - Silver: 2010Yahoo! NCAA March Madness - Silver: 2011ESPN NCAA March Madness - Bronze: 2010Yahoo! NCAA March Madness - Bronze: 2013

United States
Joined: 10/13/2006(UTC)
Location: Green Bay, WI

Applause Given: 1,911
Applause Received: 2,117

I was looking into developing my own software using ASP-MVC2 with SQL Server, but it seems like too much work. I'd be reinventing a lot of the options here.

Might as well stick with this and enhance it, instead of recreating everything, right?
UserPostedImage
Offline dhpackr  
#20 Posted : Saturday, October 23, 2010 2:55:39 AM(UTC)
dhpackr

Rank: 4th Round Draft Pick

Joined: 12/12/2007(UTC)

Applause Given: 36
Applause Received: 36

yes, stick with the PHP site. Classic ASP is an old technology. You have to write a ridiculous amount of "spaghetti" code to do even a simple database call.

Microsoft updated to .NET for a reason!
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
Offline Zero2Cool  
#21 Posted : Saturday, October 23, 2010 4:02:16 AM(UTC)
Zero2Cool

Rank: Legend

Yahoo! Fantasy Football - Gold: 2009FleaFlicker Fantasy Football - Silver: 2010Yahoo! NCAA March Madness - Silver: 2011ESPN NCAA March Madness - Bronze: 2010Yahoo! NCAA March Madness - Bronze: 2013

United States
Joined: 10/13/2006(UTC)
Location: Green Bay, WI

Applause Given: 1,911
Applause Received: 2,117

It'd be ASP.NET w/MVC2 not ASP. I thought MVC2 was only available with ASP.NET.
UserPostedImage
Offline djcubez  
#22 Posted : Saturday, October 23, 2010 10:23:29 PM(UTC)
djcubez

Rank: 2nd Round Draft Pick

Joined: 8/7/2008(UTC)
Location: Milwaukee

Applause Given: 8
Applause Received: 13

Originally Posted by: " Go to Quoted Post
Code:

&lt;?php

// $delete_query = "DELETE ?????FROM posts WHERE id='$postID'";
        // mysql_query($delete_query);
        $nonmemberposts++;    
?&gt;


wouldn't work if it wasn't commented out, this would cause an error, not telling what you want to delete.

why don't you just delete id #2, the whole row? if you are using auto increment for the id field, it wouldn't let you delete the row unless you delete the id


I explicitly stated in post why I had it commented out and that it wouldn't work unelss you removed the comments. That MySQL statement is also 100% correct it would delete the entire row for that post.
Check out my music webpage - Click Here
Offline dhpackr  
#23 Posted : Saturday, October 23, 2010 11:09:19 PM(UTC)
dhpackr

Rank: 4th Round Draft Pick

Joined: 12/12/2007(UTC)

Applause Given: 36
Applause Received: 36

I stand corrected, great job.
So if you meet me Have some courtesy, Have some sympathy, and some taste
Use all your well-learned politesse, Or I'll lay your soul to waste
Offline djcubez  
#24 Posted : Monday, October 25, 2010 8:01:47 PM(UTC)
djcubez

Rank: 2nd Round Draft Pick

Joined: 8/7/2008(UTC)
Location: Milwaukee

Applause Given: 8
Applause Received: 13

Originally Posted by: " Go to Quoted Post
I stand corrected, great job.


Sorry I had no intention of being a prick if I did come off that way :) It's always nice to have another person look through your code anyway to give some feedback.
Check out my music webpage - Click Here
 
Users browsing this topic
Guest (2)
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2014, Yet Another Forum.NET
This page was generated in 0.222 seconds.

Notification

Icon
Error

Tweeter

Recent Topics
22m / Random Babble / wpr

53m / Green Bay Packers Talk / Zero2Cool

2h / Green Bay Packers Talk / steveishere

3h / Green Bay Packers Talk / TheKanataThrilla

7h / Green Bay Packers Talk / hardrocker950

8h / Green Bay Packers Talk / uffda udfa

9h / Green Bay Packers Talk / wpr

10h / Green Bay Packers Talk / DarkaneRules

11h / Fantasy Sports Talk / Smokey

13h / Fantasy Sports Talk / Smokey

14h / Green Bay Packers Talk / porky88

15h / Green Bay Packers Talk / Smokey

15h / Green Bay Packers Talk / DakotaT

17h / Around The NFL / wpr

17h / Green Bay Packers Talk / steveishere


Copyright © 2006-2014 PackersHome.com™. All Rights Reserved.