Welcome to your Green Bay Packers Online Community!

Since 2006, PackersHome has been providing a unique experience for fans.
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

Posts: 963
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
Posts: 25,723
Joined: 10/13/2006(UTC)
Location: Green Bay, WI

Applause Given: 1,863
Applause Received: 2,023

I've deleted members in the users table, but not their posts. Therefore there's posts out there that cause errors while searching.

UserPostedImage
Click here and find the LATEST Packers News!
Offline dhpackr  
#18 Posted : Friday, October 22, 2010 11:23:58 PM(UTC)
dhpackr

Rank: 4th Round Draft Pick

Posts: 963
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
Posts: 25,723
Joined: 10/13/2006(UTC)
Location: Green Bay, WI

Applause Given: 1,863
Applause Received: 2,023

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
Click here and find the LATEST Packers News!
Offline dhpackr  
#20 Posted : Saturday, October 23, 2010 2:55:39 AM(UTC)
dhpackr

Rank: 4th Round Draft Pick

Posts: 963
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
Posts: 25,723
Joined: 10/13/2006(UTC)
Location: Green Bay, WI

Applause Given: 1,863
Applause Received: 2,023

It'd be ASP.NET w/MVC2 not ASP. I thought MVC2 was only available with ASP.NET.

UserPostedImage
Click here and find the LATEST Packers News!
Offline djcubez  
#22 Posted : Saturday, October 23, 2010 10:23:29 PM(UTC)
djcubez

Rank: 2nd Round Draft Pick

Posts: 1,751
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

Posts: 963
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

Posts: 1,751
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
Rss Feed 
Users browsing this topic
Guest
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.

Notification

Icon
Error

Recent Topics
12m / Green Bay Packers Talk / texaspackerbacker

37m / Green Bay Packers Talk / buckeyepackfan

4h / Green Bay Packers Talk / Cheesey

4h / Green Bay Packers Talk / Cheesey

4h / Random Babble / Cheesey

16h / Green Bay Packers Talk / buckeyepackfan

16h / Green Bay Packers Talk / voiceofreason

19-Aug / Green Bay Packers Talk / musccy

19-Aug / Green Bay Packers Talk / mi_keys

19-Aug / Green Bay Packers Talk / Mucky Tundra

19-Aug / Green Bay Packers Talk / nerdmann

19-Aug / Green Bay Packers Talk / Mucky Tundra

18-Aug / Green Bay Packers Talk / nerdmann

18-Aug / Green Bay Packers Talk / millertime

18-Aug / Around The NFL / wpr


Tweeter

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