is javascript compatable with MySQL?

Discussion in 'JavaScript' started by whiteblue1942, Jul 15, 2008.

  1. #1
    can javascript read and write from a MySQL database like php?

    I have tried looking in my books and it says that javascript is database compatable but they onyl give it in use with microsofts databases and not MySQL. Any help would be appreciated! Thanks!:D
     
    whiteblue1942, Jul 15, 2008 IP
  2. rohan_shenoy

    rohan_shenoy Active Member

    Messages:
    441
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #2
    You will need AJAX(javascript+XML) on the client side and PHP on the server side to communicate with MySQL database.
     
    rohan_shenoy, Jul 15, 2008 IP
  3. AaronJ

    AaronJ Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What?

    You need to use Ajax to communicate with a server-side language. Not really php. Mysql can be accessed by a lot of scripting languages.
     
    AaronJ, Jul 15, 2008 IP
  4. Panzer

    Panzer Active Member

    Messages:
    381
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Wrong. MySQL cannot be accessed by clientside/scripting languages. You need a server side language (ruby,php,asp) to actually do the command on the server. There is www.taffydb.com which is a JS database similar to mysql.
     
    Panzer, Jul 15, 2008 IP
  5. AaronJ

    AaronJ Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You just said the exact same thing that I said.
     
    AaronJ, Jul 15, 2008 IP
  6. blueparukia

    blueparukia Well-Known Member

    Messages:
    1,564
    Likes Received:
    71
    Best Answers:
    7
    Trophy Points:
    160
    #6
    Not necessarily, though it is certainly the easiest and most accessible way to do it (if a user has no Javascript enabled, then all your DB work stops).

    http://forums.digitalpoint.com/showthread.php?t=908821

    It is very similar to Ajax, but with less code, though could be very irksome for hundreds/thousands of functions.
     
    blueparukia, Jul 16, 2008 IP