#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    Php mysql noob question


    i was following a tutorial on a site , and after reading it and trying to learn from it ... i have arranged a lot of things...from it ..

    i am a noob in php and mysql and i still do not understand a lot of things ...

    We are sorry, new user accounts are not permitted to create posts containing URLs

    what a bucn of ****ing amazing idiots

    what are those things marked in red called ?


    thanks
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    Buenos Aires, Argentina
    Posts
    64
    Rep Power
    2
    Originally Posted by phpnoob13
    i was following a tutorial on a site , and after reading it and trying to learn from it ... i have arranged a lot of things...from it ..

    i am a noob in php and mysql and i still do not understand a lot of things ...

    We are sorry, new user accounts are not permitted to create posts containing URLs

    what a bucn of ****ing amazing idiots

    what are those things marked in red called ?


    thanks
    Is it just me or maybe nobody will find out what are you talking about?

    a) You cannot post links because you're new.
    b) You just created this thread and the whole account for your trouble (user phpnoob :S)
    c) Are trying to troll us? Or is it a legit real request? If so, you can put your links replacing . for , and write again the whole question EXPLAINING what's happening, what are you trying to do, what should happen (what would you LIKE and WANT to happen) as expected, and what actually happens and gives you an error message.

    Regards.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0
    ht tp://i50.tinypic.com/1znspz8.jpg

    without posting the image .. i could not ask any questions ...lol

    anyway my doubt was .. what is those things marked in red called ?

    are those called connection variables ?

    and why are some variables in brackets ?
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    Buenos Aires, Argentina
    Posts
    64
    Rep Power
    2
    Well, my friend.

    The parts marked with $ just like $help are variables.
    Many of them containing a QUERY (A statement that will create a certain quantity of data handlings and almost always will return a value).

    The first chunk of code will do as follows:

    Set $sql3 as a variable containing a query. (Select every match of 'id' -given in a prior part of the code not provided in your chunk - of that part only we care about the field named 'view', on a table provided by another variable also not provided in your example). See? It's easy.

    Then we execute a query named $sql3
    Guess what... yes, it's the one I described above, mate.

    Then, we create an array (a long 'list' of things - you better get backup from a manual, I recommend Php And MySQL from Novice to Expert from Jason W. Gilmore, he's a crack) from the obtained results.

    Variable 'view' ($view) contains the array, of values obtained from... guess... the row VIEW from the last query executed.

    You may be able to find out the rest. Believe this are the basic facts, so you better handle it well before heading far away in the theme.

    Regards.
  8. #5
  9. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,118
    Rep Power
    4274
    Originally Posted by phpnoob13
    what a bucn of ****ing amazing idiots
    insulting us is truly a brilliant way to make us feel warm towards you and willing to answer your questions

    the reason for the "no urls for new members" rule is simple -- spammers

    blame them, not us

    to answer your question, those things you marked in red are called php variables

    some of them are in parentheses because the relevant php syntax (e.g. a function) requires it

    feel any better now?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0
    thanks for the book suggestions and thanks for clearing my doubts
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    170
    Rep Power
    54
    Before you get too far, find a different tutorial. The mysql functions in your example are depreciated and if you're just starting out, you should be learning mysqli or PDO. It will make your like so much easier to learn correctly the first time.

    Comments on this post

    • badger_fruit agrees : PDO isn't so difficult and there's a load of tutorials out there aimed at every experience level :)
  14. #8
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    Buenos Aires, Argentina
    Posts
    64
    Rep Power
    2
    You're welcome. But learn to handle your messages in a proper way, learn from the older users here, I've spent little time but I have learned a lot from this people.

    Keep on my reco and read that book. It covers both PHP and MySQL also with security tips.

    Keep an eye on your language, and welcome.

IMN logo majestic logo threadwatch logo seochat tools logo