Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where is YAG? What are the reasons?
Message
De
04/04/2007 00:37:30
 
 
À
03/04/2007 20:52:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Database:
Visual FoxPro
Divers
Thread ID:
01210085
Message ID:
01211894
Vues:
17
Thank Victor. One language at a time.
php may be ugly, but it works pretty well.
There a saying that goes something like "she was ugly, but she wore a pretty dress".:)


>Try Delphi for PHP (CodeGear)
>Great stuff
>>I'm with you on this Mike.
>>JSP, ASP and php are just down right ugly. Plus working with HTML, with all its tags, don't make it any easier.
>>
>>At home I'm playing with php, married with Apache, and it's just so ugly.... but it's free! :)
>>
>>
>>>Uh, you didn't answer the question I asked. Do you have to type it in? I wouldn't want to code ASP.NET by hand in HTML, either.
>>>
>>>
>>>>I hope I never have to learn that godawful language. Do you have to type it in that way or is it generated by a GUI builder?
>>>>
>>>>In the interests of clarity, I thought I'd provide sample ASP.NET code to perform similar SQL, except with none of the error checking or handling included in the PHP version:
>>>>
>>>>
>>>>< %@ Page CompilerOptions='/R:"C:\Program Files\Microsoft.NET\Odbc.Net\Microsoft.data.odbc.dll"'% >
>>>>< %@ Import Namespace="System.Data" % >
>>>>< %@ Import Namespace="Microsoft.Data.Odbc" % >
>>>><SCRIPT Language="VB" Runat="server">
>>>>Sub Page_Load(Source as object, e as EventArgs)
>>>>Dim sConString As String = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=linux3;
>>>>DATABASE=maindata; UID=user1; PASSWORD=user1pass; OPTION=3"
>>>>Dim oConnection as ODBCConnection = new ODBCConnection(sConString)
>>>>Dim sSQL as String = "SELECT name,contact,email,enabled,username FROM customer"
>>>>Dim oDataAdapter as ODBCDataAdapter = New ODBCDataAdapter(sSQL, oConnection)
>>>>Dim oDataSet as DataSet = new DataSet()
>>>>oDataAdapter.Fill(oDataSet)
>>>>
>>>>
>>>>Here's the PHP equivalent, removing variables and error checking so it's equivalent:
>>>>
>>>>
>>>><?php
>>>>$connection=mysql_connect("linux3","user1","user1password");
>>>>$db=mysql_select_db("maindata",$connection);
>>>>$sql="SELECT name,contact,email,enabled,username FROM customer";
>>>>$result=mysql_query($sql);
>>>>
>>>>
>>>>Now we should ask a VFP person familiar with neither which is the more "godawful". ;-)
The American Republic will endure, until politicians realize they can bribe the people with their own money.
- Alexis de Tocqueville

No man’s life, liberty, or property is safe while the legislature is in session.
– Mark Twain (1866)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform