Page 3 of 5
Re: Coding discussion
Posted: Thu Mar 07, 2013 2:11 am
by Maxine MagicFox
Really? You might need to uninstall certain features? I've never had problems with it.
Anywho, I'M DONE!! with the design anyways. Maybe a little more over the top than it originally started out to be, but OH WELL! I like it :3
Enjoy this series of images from conception of the design idea to the completed design~
I might still tweak some of the colors or the fonts, but overall I'm quite happy and it's time for me to get back to focusing on php coding. I will wait to chop this up later after the coding is completed. Just in case there are things that I want to change after I've done the hard ass work.
Re: Coding discussion
Posted: Thu Mar 07, 2013 11:27 am
by Riseatrance
Maybe doing concept art on pen and paper might be a more prudent idea. Looks like you were drawing it with a mouse or something? :V
Re: Coding discussion
Posted: Thu Mar 07, 2013 12:57 pm
by Maxine MagicFox
^_^; Yeah. But trust me when I say that my pen and paper artwork isn't a whole lot better. Granted, these aren't really suppose to be all that accurate or to scale. It's just to get a rough idea down and see if I like the basic concept. Sometimes what's in my head doesn't always come through in real life XD
Re: Coding discussion
Posted: Thu Mar 07, 2013 4:22 pm
by Kimiko
Use a pen/tablet and combine your paper and digital powers
Re: Coding discussion
Posted: Thu Mar 07, 2013 6:48 pm
by Wave-tan
Re: Coding discussion
Posted: Fri Mar 08, 2013 4:11 am
by Maxine MagicFox
^_^ LOL, thanks
... currently learning how to do pagination.......... from an article that I wish was written a little clearer, but it has code provided.
Re: Coding discussion
Posted: Sat Mar 09, 2013 12:36 pm
by Maxine MagicFox
So, that article talking about pagination turned out to be a total fail - it ended up NOT being what I wanted, but it did at least give me a good start (and for some reason I still keep referencing it *sigh* )
I have a question, I'm trying to figure out how to hide the "previous" and "next" buttons for the blog when users are reading it. The "next" button isn't a big problem. I can tell that to not execute when the page is on 0, but I'm having trouble telling the previous button to get lost.
I have a rough idea that I can't even put into words yet because I'm not too sure yet where I'm going with it, but I have a more simple question:
mysql_num_rows($result);
^ is this a big resource drain? I mean for a database with only 50 records I'm sure it's not, but as the database gets bigger, if I tell this to execute every time a new paginated-page is loaded, is this something that could cause problems when the database gets much much bigger? I don't want a long load time just because it's checking how many records is stored.
Edit (me TRYING to put the idea into words): My idea I THINK is roughly maybe something like
$row_count = mysql_num_rows($result);
$records_per_page = 5;
$page = 0 //increases each click of a pagination button
$totalpages = Ceil($row_count/$records_per_page)
if ($page > $totalpages)
{
echo "<a href="url$page+1">Previous</a>";
}
This is probably sloppy as hell at the moment but it's what's floating through my head. I'll clean it up later or find the hole in it, but it's just to give you an idea of what I'm THINKING about... I can't SEE any holes in the idea yet.... Also, I abbreviated some stuff and I can't remember if I spelled "Ceil" correctly, so forgive the minor things. It's the idea I'm after. Be glad that this is cleaned up as compared to what's in my notes.
Re: Coding discussion
Posted: Wed Mar 13, 2013 3:32 am
by negzee
Re: Coding discussion
Posted: Wed Mar 13, 2013 3:58 am
by Maxine MagicFox
Re: Coding discussion
Posted: Thu Mar 14, 2013 3:26 pm
by negzee
Re: Coding discussion
Posted: Thu Mar 14, 2013 9:50 pm
by Maxine MagicFox
Sure! I get ya.
mysql_result($queryrcdnum, 0, 0);
Can you walk through this a little bit for me since it's the first time I'm seeing this particular script? What are the 0,0 for?
Re: Coding discussion
Posted: Thu Mar 14, 2013 10:21 pm
by negzee
Re: Coding discussion
Posted: Fri Mar 15, 2013 4:11 am
by Maxine MagicFox
Awww ^_^ I see. Ok. I'll update my codes.
Re: Coding discussion
Posted: Sat Apr 13, 2013 9:12 pm
by Maxine MagicFox
So, hey, negzee. Remember you told me to not mix mysql and mysqli and to choose between the two:
Well... ^_^; I tried thinking (stupidly) that I just needed to add an extra letter... but apparently... no.
:\ Umm... I did a little research but I feel that I'm in over my head in this area. Do I REALLY need to use mysqli here in these codes? I mean I have them working in the one area that I wanted them. I don't need the extra security in just making sql calls, do I?
And how would I code the new codes you gave me in the mysqli method if you do feel that I need to use this?
Re: Coding discussion
Posted: Sun Apr 14, 2013 1:24 am
by negzee
No, you don't need to use the mysqli API, but with the old mysql API you won't have access to some of the more useful functionality such as prepared statements.
The differences for basic operations are minor, and you really should choose mysqli or PDO over mysql unless you're dealing with an impenetrable pile of legacy code.