473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

(PHP/C++) Struct in ASP

How can I make a simple Struct in ASP ?

I saw a other post and it sound like "PAIN!"
struct s_my_table
{
$name,
$sexe,
$age,
}

and I DON'T wanna do something like :

<%
Dim x
Set x = New Something
Response.Write x.Name & "<br />"
Response.Write " - not yet set, will set it to ""Jorg.""<br />"
x.Name = "Jorg"
response.write x.Name
Set x = Nothing
Class Something

Private sSetName

Private Sub Class_Initialize()
sSetName = "default"
End Sub

Public Property Get Name()
Name = sSetName
End Property

Public Property Let Name(sName)
sSetName = sName
End Property

End Class
%>

PLEASE, ASP isn't so bad, isn't it ?
I love PHP :)
Jul 19 '05 #1
8 3427
PL
> PLEASE, ASP isn't so bad, isn't it ?
I love PHP :)


Ok, that should give you lots of answers in an ASP group.

If you don't like classic ASP you should start to use ASP.NET,
since you didn't say what you are using I will assume you are
in fact using classic ASP ?

What's wrong with creating a simple class ?? It's the exact thing
you are looking for, if you look at other languages such as Java
for example there are no structs there either.

If you use ASP.NET you can use C# which has structs in it.

By the way, PHP sucks, why create a method for every little stupid
thing you want to do when you can use good general programming
language and do it yourself ?

In PHP everything is cemented, lots of strange special methods
for every little thing, that IS stupid.

PL.
Jul 19 '05 #2
"PL" <pb****@yahoo.se> wrote in message news:<#l**************@tk2msftngp13.phx.gbl>...
PLEASE, ASP isn't so bad, isn't it ?
I love PHP :)


Ok, that should give you lots of answers in an ASP group.

If you don't like classic ASP you should start to use ASP.NET,
since you didn't say what you are using I will assume you are
in fact using classic ASP ?

What's wrong with creating a simple class ?? It's the exact thing
you are looking for, if you look at other languages such as Java
for example there are no structs there either.

If you use ASP.NET you can use C# which has structs in it.

By the way, PHP sucks, why create a method for every little stupid
thing you want to do when you can use good general programming
language and do it yourself ?

In PHP everything is cemented, lots of strange special methods
for every little thing, that IS stupid.

PL.


If I posted here, that's because I wanted I answer on ASP...
I resolve my little problems with arrays...

By the way, how many lines of do you need in ASp to do than :
$sql="SELECT id_Film FROM films WHERE nom = '".$_POST["nom"]."' AND
langue = '".$_POST["langue"]."' AND Type = '".$_POST["Type"]."'";
if (mysql_num_rows(mysql_query($sql)) < 1)
{
$sql="INSERT films set nom = '".$_POST["nom"]."', Type = '".$_POST
["Type"]."', langue = '".$_POST["langue"]."'";

$db->query($sql);
$new_id = mysql_insert_id();
$keys = array_keys($_POST["user"]);
for($i=0;$i<count($keys);$i++)
{
$sql = "INSERT user_film SET id_Film = '".$new_id."', id_User =
'".$keys[$i]."'";
$db->query($sql);
}
$sct .= "Le film ".$_POST["nom"]." a été sauvegarder dans la base de
donnée<BR>";
$_POST["nom"] = "";
}

Why I like PHP :
Simple, consistent syntax. Just as powerful as Perl minus the cryptic
syntax.
Robust array support saved me from hours of boring utility function
programming so many times that I am eternally grateful.
Excellent string manipulation functions.
Advanced Perl-compatible regular expression functions offer extra
power where standard regular expressions just don't cut. I especially
like preg_split.
Easy database access: MS SQL Server, MySQL, Oracle, PostgreSQL, etc.
Output control functions give you absolute power on the output
generated by your script.
Flexible dynamic image generation functions let you generate images
on-the-fly without which charts like this wouldn't have been possible.
Easy-to-use FTP functions without which this board's auto
install/upgrade functions can't possibly work.
Powerful command line interface (CLI) for shell scripting.
Excellent reference manual. Also, individual function references are
easily accessible by simply typing the function name after the php.net
URL (for example: http://www.php.net/strpos).
(It's from me but I don't have the time and skill in english to write
something like that...
http://www.wowwebdesigns.com/wowbb/forum12/149.html)
Jul 19 '05 #3
"Alex" <ga*****@hotmail.com> wrote in message
news:4d**************************@posting.google.c om...
How can I make a simple Struct in ASP ?

I saw a other post and it sound like "PAIN!"
struct s_my_table
{
$name,
$sexe,
$age,
}

and I DON'T wanna do something like :

<%
Dim x
Set x = New Something
Response.Write x.Name & "<br />"
Response.Write " - not yet set, will set it to ""Jorg.""<br />"
x.Name = "Jorg"
response.write x.Name
Set x = Nothing
Class Something

Private sSetName

Private Sub Class_Initialize()
sSetName = "default"
End Sub

Public Property Get Name()
Name = sSetName
End Property

Public Property Let Name(sName)
sSetName = sName
End Property

End Class
%>

PLEASE, ASP isn't so bad, isn't it ?
I love PHP :)


<script language="JavaScript" runat="SERVER">
var myStruct =
{
name:"Chris Hohmann",
sex:"male",
age:29
};
</script>

HTH-
Chris Hohmann
Jul 19 '05 #4
Has anybody got a good pros and cons list of PHP versus ASP?

Chris Hohmann wrote:
"Alex" <ga*****@hotmail.com> wrote in message
news:4d**************************@posting.google.c om...
How can I make a simple Struct in ASP ?

I saw a other post and it sound like "PAIN!"
struct s_my_table
{
$name,
$sexe,
$age,
}

and I DON'T wanna do something like :

<%
Dim x
Set x = New Something
Response.Write x.Name & "<br />"
Response.Write " - not yet set, will set it to ""Jorg.""<br />"
x.Name = "Jorg"
response.write x.Name
Set x = Nothing
Class Something

Private sSetName

Private Sub Class_Initialize()
sSetName = "default"
End Sub

Public Property Get Name()
Name = sSetName
End Property

Public Property Let Name(sName)
sSetName = sName
End Property

End Class
%>

PLEASE, ASP isn't so bad, isn't it ?
I love PHP :)

<script language="JavaScript" runat="SERVER">
var myStruct =
{
name:"Chris Hohmann",
sex:"male",
age:29
};
</script>

HTH-
Chris Hohmann


Jul 19 '05 #5
ASP is good because I know it. PHP is not good, because I know very little
of it. The opposite would be true for people who know PHP.

Ray at work

"Portroe" <fb@oooi.com> wrote in message
news:bv*************@news.t-online.com...
Has anybody got a good pros and cons list of PHP versus ASP?

Jul 19 '05 #6
*groan* not again, please


"Portroe" <fb@oooi.com> wrote in message
news:bv*************@news.t-online.com...
Has anybody got a good pros and cons list of PHP versus ASP?

Jul 19 '05 #7
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:%2****************@TK2MSFTNGP11.phx.gbl...
ASP is good because I know it. PHP is not good, because I know very little of it. The opposite would be true for people who know PHP.


LOL! Oh Ray, your wisdom is a blessing. ;)
BTW, I share you sentiment. Hehehe. To me, PHP looks an aweful lot like
Perl... and while it may be powerful, I find the systax to be messy and hard
to work with.

But then again, I'm just a CAVE man! Your technology FRIGHTENS and CONFUSES
me! :)

Regards,
Peter Foti
Jul 19 '05 #8

"Peter Foti" <pe***@Idontwantnostinkingemailfromyou.com> wrote in message
news:10*************@corp.supernews.com...
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:%2****************@TK2MSFTNGP11.phx.gbl...
ASP is good because I know it. PHP is not good, because I know very little
of it. The opposite would be true for people who know PHP.


LOL! Oh Ray, your wisdom is a blessing. ;)
BTW, I share you sentiment. Hehehe. To me, PHP looks an aweful lot like
Perl... and while it may be powerful, I find the systax to be messy and

hard to work with.


One of the things that I don't like about PHP is that there is no challenge
in it. There's a damn built-in function for EVERYTHING. So, instead of
learning how to write code to manipulate data, you waste all your brain
space memorizing the names (and case) of sixteen million functions with very
little variance among them all and don't learn the logic behind the
functions. Damn PHP! PHP is for people who are "answer men" - people who
just want the answer as opposed to learning how to derive it.

Ray at work
Jul 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Richard | last post by:
I'm beginning to undertake php for the fun of it. Working on a problem I hope can be solved in php. Basically what I have is this: <body> <img name="main" src="image1.jpg"> <a href="#"...
0
by: Slavik | last post by:
All libraries were installed (precompiled) This is FreeBSD 5.1 installed zlib, installed jpeg and png libraries (in default directories) GD 2.0.11 source is in /usr/gd-2.0.11 (compiled and...
0
by: glin | last post by:
Hi I am trying to integrate the xmlrpc server into a class, does anyone know how to get it working? test.html: <html> <head> <title>XMLRPC Test</title> <script src="jsolait/init.js"></script>...
0
by: basement_addict | last post by:
First off I am new to xmlrpc.I am working on a project that requires me to return this structure. <?xml version="1.0"?> <methodResponse> <params> <param> <struct> <member> <name>files</name>
2
by: scallst | last post by:
Hi! I'm new in PHP and I have a problem on sending a socket message to c-server. I am able to connect using socket_connect but my problem is I have to setup TCP message in a special format as my...
1
by: paulsendave | last post by:
What a mix! Whilst I grep around for the first set of problems, I thought I'd ask any generous members of this PHP community for clues... I've started by trying out the instructions at:...
0
by: silvrique | last post by:
I am totally lost. I have an xml script example as follows: <?xml version="1.0" encoding="utf8" ?> <starter> <second> <name>Silver</name> </second> </starter>
26
by: K.J.Williams | last post by:
Hello, A friend and I want to learn PHP but we have two totally different programming backgrounds. I have experience with procedural programming in C, and he has experience with Visual BASIC....
2
by: mostafijur | last post by:
Hello I need to convert database attributes into Records using PHP. For example My database attributes are like : C like structure: struct Info {
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.