| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Oct 2003
Posts: 3,472
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Good project to better my php skills? What would be a good project to better my php skills? Im new at php and finish coding a simple script at: http://www.netsnatch.com/script (which checks to see if the entered domain contains a valid license) I dont think im ready with mysql, as most of the mysql information in the above script was copied from other scripts i bought. |
| |
| | #2 (permalink) |
| Buy my domains. Join Date: Feb 2006
Posts: 2,796
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | http://www.netsnatch.com/script/ Doesn't work. ![]() MySQL basically has 3 commands (insert, select, update; the others aren't used as much) that you need to know. It isn't hard at all. |
| |
| | THREAD STARTER #3 (permalink) |
| Senior Member Join Date: Oct 2003
Posts: 3,472
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | im working on making the script do more right now so it may give errors at times. The things im not understanding right now about mysql is mysql_query mysql_fletch_array etc. Edit: How can i get the number in a row in the database? Code: <? $query = "SELECT downloads FROM counter WHERE id='1'"; $result = mysql_query($query); $myrecord = mysql_fetch_row($result); echo''.$myrecord.''; ?>
__________________ hostvouchers - Coupons and Reviews for the top web hosts! (shared, reseller, vps, servers, adult, offshore, proxy)
Last edited by killaklown; 07-04-2006 at 08:52 PM.
|
| |
| | #5 (permalink) |
| Buy my domains. Join Date: Feb 2006
Posts: 2,796
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Use mysql_fetch_array instead of mysql_fetch_row. I don't know why you are doing echo '', since the '' doesn't do anything. $myrecord is an array with the row you got from the database. If you do mysql_fetch_array instead of mysql_fetch_row, you can do $myrecord['something'], where something is the name of the column in the database. |
| |
| | #8 (permalink) |
| NamePros Regular Join Date: Jun 2005 Location: UK
Posts: 688
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | PHP Code: Flubb. |
| |