+ Reply to Thread
Results 1 to 10 of 10

Thread: Moron question

  1. #1
    drf1229 is offline x10Hosting Member drf1229 is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    71

    Moron question

    I am a programmer of many languages but I have a few issues. I want to learn sql code but have no idea where to input it! Do I make files or is there a program I use? Please, captain obvious point it out to me... Thanks in advance!

  2. #2
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: Moron question

    well you can run it manually from PHPMyAdmin

    or make a script to run it once an action has been completed in PHP, there are also other languages available, but i think this is the most popular

  3. #3
    ivandist's Avatar
    ivandist is offline x10Hosting Member ivandist is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    11

    Re: Moron question

    Well that's a good start -> http://www.w3schools.com/sql/default.asp

    What exactly do you need SQL for?
    Are you working with any SQL based databases? MySQL, PostgreSQL?

  4. #4
    drf1229 is offline x10Hosting Member drf1229 is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    71

    Re: Moron question

    Quote Originally Posted by diabolo View Post
    there are also other languages available, but i think this is the most popular
    I usually use PHP and files instead of SQL but I felt like I should learn how to use SQL. Thank you for your advice!

  5. #5
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Moron question

    Also check out the thread "SQL for noobs".
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  6. #6
    hezuo's Avatar
    hezuo is offline x10 Sophmore hezuo is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    Huascar, Santa Anita
    Posts
    174

    Re: Moron question

    another silly question... can you create store procedures via phpmyadmin? (real noob here)

  7. #7
    espfutbol98's Avatar
    espfutbol98 is offline x10 Sophmore espfutbol98 is an unknown quantity at this point
    Join Date
    Apr 2009
    Location
    Zagreb... želim
    Posts
    200

    Re: Moron question

    yeah, you write commands in sql code and insert them in phpMyAdmin or have them in php files

  8. #8
    drf1229 is offline x10Hosting Member drf1229 is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    71

    Re: Moron question

    Thank you so much for your replies! I feel like such an idiot now...

  9. #9
    pythondev is offline x10Hosting Member pythondev is an unknown quantity at this point
    Join Date
    Mar 2009
    Posts
    59

    Re: Moron question

    P.S.

    phpMyAdmin will echo the SQL that it uses for each CREATE,INSERT, UPDATE, etc comand, good idea to copy it down...

    then you can use it later for your php, just change the WHERE something='something' to something='".$value."' like that...

    Have fun....

  10. #10
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Moron question

    Quote Originally Posted by pythondev View Post
    then you can use it later for your php, just change the WHERE something='something' to something='".$value."' like that...
    Better yet, use prepared statements: change statement to "... WHERE something=:something ...". PHP code looks like:
    PHP Code:
    $stmt $db->prepare('... WHERE something=:something ...');
    $stmt->execute(array(':something'$value)); 
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. Is Rand Paul a Freemason?
    By allofus in forum Crossfire
    Replies: 6
    Last Post: 10-02-2009, 04:52 AM
  2. Earn Credits Answering, this VERY, VERY SIMPLE Question!
    By admintwo in forum The Marketplace
    Replies: 4
    Last Post: 02-17-2008, 09:59 PM
  3. Lottery Website (kind of)
    By admintwo in forum Earning Money
    Replies: 4
    Last Post: 12-29-2007, 05:07 PM
  4. Odd question but will I be banned for this?
    By sielk in forum Free Hosting
    Replies: 3
    Last Post: 09-28-2007, 11:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers