Things I've been wondering about
View Single Post
12-04-2007, 11:53 PM
Join Date: Nov 2007
Originally Posted by
I heard that echo is faster but print enables you to do more things with it?
returns a value, whereas echo() does not, so echo() is slightly faster. I can't think of a valid example to show why returning true/1 from print() would be useful. For all standard code where you simply want to output something to the display, use echo().
I'm confused as to which one I should use mysql_* or mysqli_* the more secure one and fastest?
You should use the MySQL "Improved" extension if you're using MySQL v4.1 and above. Having said that, you should be using MySQL v5.0 and above.
Can MySQL tables store URLs? And if so, can MySQL and or PHP input that URL into the browser so that the user can be redirected?
Yes. A MySQL text type data field will store any plain text you want. You simply need to retrieve that data with a properly fashioned SQL statement and create URL's with PHP. Depending on what you really need to do, this may not be very efficient.
magic_quotes are being turned off by default in php6. Is there a list I can view (can't find it in php.net) that shows what will be added/taken off(or thinking about it). I'm going to stick with a book I have, but its a little out dated. (edit: or just from the top of your head) so that I dont learn things that are not safe to use.
magic_quotes are to be avoided in any version of PHP. I'm sorry I don't have a link to what v6 will include or exclude, but I'm sure you can find it if you review some of the developer notes. Just use good coding practices and you should be fine.
View Public Profile
Send a private message to SOCK
Find More Posts by SOCK