PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Aug 15, 2006 12:40 pm
At this point here, it is not. It is coming from the images table.
Code: Select all
$result = mysql_query("SELECT * FROM images");
while ($row = mysql_fetch_array($result)) {
$images[$row['name']] = $row['value'];
}
$max_results = $row['maxshow'];
// As of theline above $row is the result from the select on the images table
adamb10
Forum Commoner
Posts: 91 Joined: Sat Jun 24, 2006 7:44 pm
Post
by adamb10 » Tue Aug 15, 2006 12:50 pm
I updated the code to change max_results stored in settings. I forgot to change the variable. Even after changing the variable it still didnt work.
I think I need a new pagination script since it never worked anyways.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Aug 15, 2006 12:57 pm
Try a different one. There are a few in the snippets forum I believe.
adamb10
Forum Commoner
Posts: 91 Joined: Sat Jun 24, 2006 7:44 pm
Post
by adamb10 » Tue Aug 15, 2006 1:23 pm
I'm redoing the entire database since I used columns before. :X
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Aug 15, 2006 1:34 pm
How much expeirence do you have with PHP and databases? Just wondering.
adamb10
Forum Commoner
Posts: 91 Joined: Sat Jun 24, 2006 7:44 pm
Post
by adamb10 » Tue Aug 15, 2006 2:05 pm
I thought I had a moderate amount but now I think I'm a n00b at it. I've used MySQL for around 1 1/2 years now.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Aug 15, 2006 3:59 pm
Cool. It just seemed like you were getting crossed up a bit in that script you were using. It's all good. We are here to help. Keep plugging away at it and sooner or later you'll be a PHP Codemonkey like the rest of us.
adamb10
Forum Commoner
Posts: 91 Joined: Sat Jun 24, 2006 7:44 pm
Post
by adamb10 » Tue Aug 15, 2006 6:48 pm
The script is a guestbook and is actually one of the more advanced ones out there. I got Custom BBCode, World Filter, Baning, search(broken now), and soon smiley management.
Anyway I just found out that every query in the script has to be rewritten so now I'm kinda <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> off.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Tue Aug 15, 2006 7:19 pm
Well, good luck. Remember there are a lot of seasoned developers here that are willing to help you figure out your stresses and messes.
Weirdan
Moderator
Posts: 5978 Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine
Post
by Weirdan » Tue Aug 15, 2006 8:26 pm
World Filter
that should be great!
adamb10
Forum Commoner
Posts: 91 Joined: Sat Jun 24, 2006 7:44 pm
Post
by adamb10 » Wed Aug 16, 2006 8:09 pm
I need some help again creating a table in my database.
This table requires an id field. I set up 3 fields...
name
value
id
The id is a primary key with auto increment. I create 2 rows called ip and reason but this is where the problem resides...
What do I do about it?
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Wed Aug 16, 2006 9:03 pm
What are you trying to do with this table?
adamb10
Forum Commoner
Posts: 91 Joined: Sat Jun 24, 2006 7:44 pm
Post
by adamb10 » Wed Aug 16, 2006 9:22 pm
Its to hold ips and a reason. It's for banning visitors from the script.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Wed Aug 16, 2006 9:37 pm
You are going to need a little more in your table. Maybe like this...
ban_id ( int(11), autoincrement, primary key)
ban_user_id (int)
ban_date
ban_release_date
ban_ip
ban_reason (varchar(255) or text)
adamb10
Forum Commoner
Posts: 91 Joined: Sat Jun 24, 2006 7:44 pm
Post
by adamb10 » Thu Aug 17, 2006 8:59 am
Why do I need the additional info?