Jump to content

jocabergs

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jocabergs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. "Full error message" You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0,1' at line 1 in C:\web\widgetcorp\includes\functions.php on line 29 Database query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0,1' at line 1 I did replace that string, with your code, but it still returned the same error. Its got something to do with the LIMIT statement in sql, or I've totally screwed up something else, I guess what I'm asking is am I crazy or is that syntax correct? It just repeated the same error, sorry for not being more clear earlier and thanks for your help. UPDATE: I found the error, thanks for your help. The error had nothing to do with the MYSQL query it had to do with me changing a couple ambiguous variable names on my content page and missing one of them. I still wonder why it specifically pointed to the query though.. oh well working now, thanks for taking your time to look at it.
  2. okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMIT statement, but as far as I can see I have it right, currently using easymysql3.0 as test server, which was latest version as of a couple weeks ago. function get_subject_by_id($subject_id) { global $connection; $query = "SELECT * "; $query .="FROM subjects "; $query .="WHERE id=" . $subject_id . " "; $query .="LIMIT 1"; //this is the line I'm having problems with comes up as syntax error ***this is where problem is at least the one I know about*** $result_set = mysql_query($query, $connection); confirm_query($result_set); //if no rows are returned fetch array will return false if ($subject = mysql_fetch_array($result_set)) { return $subject; } else { return NULL; } } I'd really appreciate the help, thanks for looking at it.
  3. Thanks for the feedback, I appreciate it. side note: is it me or are these Captcha's ridiculously hard? I've had to reload it 3-4 times each time I post
  4. So I'm just finishing up a couple of books on PHP and getting ready to jump into a third book(I like to take a multi-book approach to learning new languages, helps reinforce what I've learned). I'm starting to feel pretty comfortable with the language and getting to the point where I can develop my own fully functional web pages with php and I'm hoping to get into advanced stuff soon. I'm wondering if I should bother with drupal and other similar CMS's right now, or put it off for a bit. Also, I'm wondering if I should commit myself to a framework before I get into more advanced stuff. From a time standpoint I'm torn because I know working in a framework will help me get some of the advanced stuff right, but I don't want to miss anything or not understand something I'm doing. I'm at the point now where I can build a basic CMS from scratch, I know the basic security stuff and I have a good grasp of ajax and DOM from school. I understand how to basically create any design I wireframe, but.. I still have a way to go to get code optimized, secure and to fully understand some of the more complex stuff. Anyhow, I'd really appreciate advice on whether to get into zend or something similar now or to wait until I've completed a few advanced books.
  5. jocabergs

    Hello

    Hi all, Thought I'd introduce myself, I'm John. I'm learning php right now and after scanning the forums for a bit, I realized this is the place I need to be. I'm in the process of taking a year off between undergrad and potentially law school right now; however, my undergrad major was MIS with a concentration in web design. I'm working part time to pay the bills right now, while I finish up my house and I've committed myself to learning PHP, Mysql and flash during this year hiatus in hopes of giving myself a solid back up option if I sour on the idea of law school(read as I've allready soured a bit on law school and I love programming, I just want to see if I can do it before I commit). I hope everyone has a Happy Thanksgiving if you live in the US, if not your missing my mom's pumpkin pie and for that I am truly sorry. I'm sure I'll be on quite a bit in the near future as I start to encounter problems and hopefully I will be able to contribute to the community after that. So far though I'm really loving php in comparison to asp.net which was what I learned in undergraduate.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.