Open Database On-Rev Examples?
Hi there, Does anyone have a good example of opening a MySQL database on On-Rev using a Rev stack on a local machine? I've looked at the documentation thus far, and found it to not be adequate. I just keep getting the following message, which I believe is telling me that it just didn't connect at all in the first place. Lost connection MySQL server during query I don't know if this a password permissions problem or path problem or what. Suggestions? Thanks in advance! Rick ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Open Database On-Rev Examples?
Hi Rick, Should this example help ? function MySQL_idesk_lib tparam1 ,tparam2,tparam3,tparam4,tparam5,tparam6,tparam7,tparam8,tparam9 put revOpenDatabase (mysql,localhost,user,db_name,password) into myDatabaseID if myDatabaseID is not a number then return There was an error connecting to the SQL database! else if tparam1 is unselect_grid then put UPDATE definitions_en_cours SET edit_timeout = '0' WHERE abo_email = ' tparam2 ' AND editable_grid = ' tparam3 ' into sqlStatement revExecuteSQL myDatabaseID,sqlStatement if the result is not a number then return error while submitting the UPDATE statement ... else return else if tparam1 is update_tarif_webstore then put UPDATE abonnes SET abo_tarif_webstore = ' tparam3 ' WHERE abo_email = ' tparam2 ' into sqlStatement revExecuteSQL myDatabaseID,sqlStatement if the result is not a number then return error while submitting the UPDATE statement ... else return tparam3 else if tparam1 is tarif_webstore then put SELECT * FROM abonnes WHERE abo_email = ' tparam2 ' into sqlStatement put revQueryDatabase(myDatabaseID,sqlStatement) into dbCursorID if dbCursorID is not a number then return There was en error submitting the SELECT statement! else if revNumberOfRecords(dbCursorID) is 1 then return word 1 to -1 of revDatabaseColumnNamed(dbCursorID,abo_tarif_webstore) else return end if else if tparam1 is addgridtoedit then put INSERT INTO definitions_en_cours SET abo_email = ' tparam2 ', editable_grid = ' tparam3 ', edit_timeout = ' the seconds \ ', abo_directory = ' tparam4 ' into sqlStatement revExecuteSQL myDatabaseID,sqlStatement if the result is not a number then return error while submitting the INSERT statement ... else return else if tparam1 is display_clues then put SELECT * FROM definitions_en_cours WHERE abo_email = ' tparam2 ' AND editable_grid = ' tparam3 ' into sqlStatement put revQueryDatabase(myDatabaseID,sqlStatement) into dbCursorID if dbCursorID is not a number then return error while submitting the SELECT statement ... else if revNumberOfRecords(dbCursorID) is not 0 then return revDatabaseColumnNamed(dbCursorID,h_grid_clues) | revDatabaseColumnNamed(dbCursorID,v_grid_clues) | revDatabaseColumnNamed(dbCursorID,xml_plot) end if else if tparam1 is accepted_clues then put SELECT * FROM definitions_en_cours WHERE abo_email = ' tparam2 ' AND editable_grid = ' tparam3 ' into sqlStatement put revQueryDatabase(myDatabaseID,sqlStatement) into dbCursorID if dbCursorID is not a number then return error while submitting the SELECT statement ... else if revNumberOfRecords(dbCursorID) is not 0 then return revDatabaseColumnNamed(dbCursorID,h_grid_clues) | revDatabaseColumnNamed(dbCursorID,v_grid_clues) | \ revDatabaseColumnNamed(dbCursorID,xml_plot) | revDatabaseColumnNamed(dbCursorID,CCL) end if else if tparam1 is publish_target then replace | with in h_grid_clues replace | with in v_grid_clues put INSERT INTO tparam2 SET abo_email = ' tparam3 ', editable_grid = ' tparam4 \ ', h_grid_clues = ' tparam5 ', v_grid_clues = ' tparam6 \ ', xml_plot = ' tparam7 ', colab_copy_name = ' tparam8 ', publish_date = ' the seconds ' into sqlStatement ### ajouter tarif de mise à prix ### revExecuteSQL myDatabaseID,sqlStatement if the result is not a number then return error while submitting the INSERT statement ... else put DELETE FROM definitions_en_cours WHERE abo_email = ' tparam3 ' AND editable_grid = ' tparam4 ' into sqlStatement
Re: Open Database On-Rev Examples?
Does anyone have a good example of opening a MySQL database on On-Rev using a Rev stack on a local machine? I use the scripts from the Splash21 web site http://splash21.on-rev.com/. If you sign up, you can download all the files. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Open Database On-Rev Examples?
Hi Pierre, I'll take a look at this! Thanks, Rick On Jan 26, 2010, at 9:38 PM, Pierre Sahores wrote: function MySQL_idesk_lib tparam1,tparam2,tparam3,tparam4,tparam5,tparam6,tparam7,tparam8,tparam9 put revOpenDatabase (mysql,localhost,user,db_name,password) into myDatabaseID if myDatabaseID is not a number then return There was an error connecting to the SQL database! else if tparam1 is unselect_grid then put UPDATE definitions_en_cours SET edit_timeout = '0' WHERE abo_email = ' tparam2 ' AND editable_grid = ' tparam3 ' into sqlStatement revExecuteSQL myDatabaseID,sqlStatement if the result is not a number then return error while submitting the UPDATE statement ... else return else if tparam1 is update_tarif_webstore then put UPDATE abonnes SET abo_tarif_webstore = ' tparam3 ' WHERE abo_email = ' tparam2 ' into sqlStatement revExecuteSQL myDatabaseID,sqlStatement if the result is not a number then return error while submitting the UPDATE statement ... else return tparam3 else if tparam1 is tarif_webstore then put SELECT * FROM abonnes WHERE abo_email = ' tparam2 ' into sqlStatement put revQueryDatabase(myDatabaseID,sqlStatement) into dbCursorID if dbCursorID is not a number then return There was en error submitting the SELECT statement! else if revNumberOfRecords(dbCursorID) is 1 then return word 1 to -1 of revDatabaseColumnNamed(dbCursorID,abo_tarif_webstore) else return end if else if tparam1 is addgridtoedit then put INSERT INTO definitions_en_cours SET abo_email = ' tparam2 ', editable_grid = ' tparam3 ', edit_timeout = ' the seconds \ ', abo_directory = ' tparam4 ' into sqlStatement revExecuteSQL myDatabaseID,sqlStatement if the result is not a number then return error while submitting the INSERT statement ... else return else if tparam1 is display_clues then put SELECT * FROM definitions_en_cours WHERE abo_email = ' tparam2 ' AND editable_grid = ' tparam3 ' into sqlStatement put revQueryDatabase(myDatabaseID,sqlStatement) into dbCursorID if dbCursorID is not a number then return error while submitting the SELECT statement ... else if revNumberOfRecords(dbCursorID) is not 0 then return revDatabaseColumnNamed(dbCursorID,h_grid_clues) | revDatabaseColumnNamed(dbCursorID,v_grid_clues) | revDatabaseColumnNamed(dbCursorID,xml_plot) end if else if tparam1 is accepted_clues then put SELECT * FROM definitions_en_cours WHERE abo_email = ' tparam2 ' AND editable_grid = ' tparam3 ' into sqlStatement put revQueryDatabase(myDatabaseID,sqlStatement) into dbCursorID if dbCursorID is not a number then return error while submitting the SELECT statement ... else if revNumberOfRecords(dbCursorID) is not 0 then return revDatabaseColumnNamed(dbCursorID,h_grid_clues) | revDatabaseColumnNamed(dbCursorID,v_grid_clues) | \ revDatabaseColumnNamed(dbCursorID,xml_plot) | revDatabaseColumnNamed(dbCursorID,CCL) end if else if tparam1 is publish_target then replace | with in h_grid_clues replace | with in v_grid_clues put INSERT INTO tparam2 SET abo_email = ' tparam3 ', editable_grid = ' tparam4 \ ', h_grid_clues = ' tparam5 ', v_grid_clues = ' tparam6 \ ', xml_plot = ' tparam7 ', colab_copy_name = ' tparam8 ', publish_date = ' the seconds ' into sqlStatement ### ajouter tarif de mise à prix ### revExecuteSQL myDatabaseID,sqlStatement if the result is not a number
Re: Open Database On-Rev Examples?
Hi Sarah, I signed up for Splash21. When I tried to login, it keeps giving me a login error. I've tried it at least 12 times or more. The site isn't working correctly for some weird reason. Thanks, Rick On Jan 26, 2010, at 9:44 PM, Sarah Reichelt wrote: Does anyone have a good example of opening a MySQL database on On-Rev using a Rev stack on a local machine? I use the scripts from the Splash21 web site http://splash21.on-rev.com/. If you sign up, you can download all the files. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution __ Rick Harrison You can buy my $10 music album Funny Time Machine digital CD on the iTunes Store Now! To visit the iTunes Store now to listen to samples of my CD please click on the following link. (Please note you must have iTunes installed on your computer for this link to work.) http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playListId=213668290 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Open Database On-Rev Examples?
Hi Sarah, Nevermind. Once I checked my email, I found the confirmation link required to validate the account. You would think they would have said a little something about that when one signs up. Thanks for the recommendation. I'm looking at the database script examples now. Rick On Jan 26, 2010, at 11:42 PM, Rick Harrison wrote: Hi Sarah, I signed up for Splash21. When I tried to login, it keeps giving me a login error. I've tried it at least 12 times or more. The site isn't working correctly for some weird reason. Thanks, Rick On Jan 26, 2010, at 9:44 PM, Sarah Reichelt wrote: Does anyone have a good example of opening a MySQL database on On-Rev using a Rev stack on a local machine? I use the scripts from the Splash21 web site http://splash21.on-rev.com/. If you sign up, you can download all the files. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution __ Rick Harrison You can buy my $10 music album Funny Time Machine digital CD on the iTunes Store Now! To visit the iTunes Store now to listen to samples of my CD please click on the following link. (Please note you must have iTunes installed on your computer for this link to work.) http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playListId=213668290 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution __ Rick Harrison You can buy my $10 music album Funny Time Machine digital CD on the iTunes Store Now! To visit the iTunes Store now to listen to samples of my CD please click on the following link. (Please note you must have iTunes installed on your computer for this link to work.) http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playListId=213668290 ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution