|
-
Language Choice
Date: 01/17/06
(WebDesign) Keywords: php, programming, mysql, database, sql, java, postgresql, web, apache
I need some advice in regard to which language to use for developing a
dynamic website. My wife and I are thinking about creating a LMAO website, which will allow people to organize
various LMAO projects. The website will allow users to register, log in, create
projects, join projects, upload pictures, and so on. It's not terribly large
project, but still pretty complicated for people who haven't done any web
development and little programming in general.
The first problem is deciding upon a language to use. The site will, at least
in the beginning, run on our server at home, which is FreeBSD running Apache2
(or anything else we want, to be honest. I'm not giving up FreeBSD, though!). It
looks like all major languages in the field, including PERL, Ruby (and Ruby on
Rails), Python, and PHP work well with Apache, so that shouldn't be a problem.
For the database back-end, we'll be using PostgreSQL or MySQL (if we have to),
both of which are widely supported as well.
My wife doesn't have much experience in programming, so for her it will be
new experience one way or the other. I have some, but still little. The only
language I'm familiar with and can actually write something useful in is Common
Lisp. There exists mod_lisp and a couple of web development frameworks, TBNL and
UnCommon Web, but the process seems hacky -- from what I can tell -- unless one
uses a commercial CL implementations that
cost a lot.
I've looked briefly at Python and Ruby, as well as asked for opinions from
various groups of people (programmers who prefer Lisp, Ruby, or Python), but
it's all still looks like mambo-jumbo to me. The only thing they agree on is
that one should refrain from using PHP for anything non-trivial, so I'm inclined
to believe that. As far as PERL is concerned, I've always had a distaste for it,
so am not all that keen on using it.
Could anyone recommend one of these language, or perhaps another one, that
would be suitable for our needs? I've pretty much made up my mind in regards to
PHP and PERL, so I'm not looking for a debate about why they're good. I also
wish to stay away from Windows-based and Java-based solutions.
Source: http://www.livejournal.com/community/webdesign/1045210.html
-
PHP layout/database question
Date: 01/17/06
(PHP Community) Keywords: php, css, html, database, web
I have a website, just a little personal project where I archive my writing. Over the years I have streamlined the code of this page as my knowledge of web design grows, so that it has gone from ugly frames to a smooth CSS-based design. However, this site has many identical pages (as far as layout is concerned, not content), and every time I significantly update the site layout, I always end up having to update each and every page manually. This is a pain.
So here is what I would like to do about this:
1) Create a database of some sort, or maybe just a collection of .txt files, and when a user clicks on a link (say, to one of my poems), have PHP generate the page based on information parsed in the link. I have no idea if this is even possible.
or
2) Create one file containing all of the layout's HTML information, and have each page access it instead of having to hardcode such into each file. This file could also contain the CSS information if possible.
The trick to all this is that while I am a master of HTML/CSS design, I know next to nothing about PHP, beyond how to write the simplest of scripts and how to upload it to my domain. Is what I'm proposing even feasible, and if so, does anyone have any suggestions/advice/code/places to go for more information to help me make it work?
Thanks so much if you can help me, and apologies for being such a newbie pain!
Source: http://www.livejournal.com/community/php/395976.html
-
Text-to-DB Conversion.
Date: 01/17/06
(SQL Server) Keywords: database, sql
A new product that might be of interest to users in this community: TextConverter
Synopsis: - extraction of data from text files (from simple CSV to complex) - script-enabled transformation - load into any database including SQL Server
Any feedback would be greatly appreciated.
Source: http://www.livejournal.com/community/sqlserver/40315.html
-
Browser problem or code problem?
Date: 01/17/06
(PHP Community) Keywords: php, mysql, browser, database, sql
Ok, so I have the following code, meant to delete a category in a script I'm working on. It takes the category ID from the $_GET array, checks the database to make sure such a category ID exists, then deletes it if true or shows an error if false.
if ($_GET['categories'] == "deletecat") { if (isset($_GET['delid'])) { $idofd = cleaninput($_GET['delid'], 1); $idofd = (int)$idofd; $check_delete = mysql_fetch_assoc(mysql_query("SELECT * FROM table_cats WHERE cat_id = '" . $idofd . "' LIMIT 1", $connect)); if (empty($check_delete)) { echo "Error: There is no category with the ID number " . $idofd . ". "; } else { $deletecateg = mysql_query("DELETE FROM table_cats WHERE cat_id = '" . $idofd . "' LIMIT 1", $connect); if ($deletecateg) { echo "The category was successfully deleted. Go back "; } else { echo "The category could not be deleted: " . mysql_error($connect) . " "; } } } else { echo "Error: No category selected for deletion. "; } }
When I execute this code, Firefox will always tell me that there is no category with the ID number specified, even when it does exist - however it will delete the category anyway. Opera does things correctly - a category is selected for deletion and the success message is shown.
Is this a browser problem or a code problem? I have tried all sorts of different solutions, originally the code was as such:
if (!empty($check_delete)) {
// delete the category
}
else {
// display error
}
However I switched it around thinking that maybe Firefox was taking too long to check the category and then finding it deleted or something like that.
I haven't been able to test this in IE yet, but I have a feeling it might work, like it did in Opera. So... any ideas as to why it's not working in Firefox?
Specs: PHP 5.0.5/MySQL 5.0.15 running on Windows XP (local testing server); Firefox 1.5
Thanks in advance.
PS: First post to this community! *Bows low*
Edit: Solved! Firefox didn't like having a button in the form field used to get the delete ID (it's a "get" method form). Changed it to a normal link and everything now seems to be working as it should. :)
Source: http://www.livejournal.com/community/php/396330.html
-
Oracle fixes pile of bugs
Date: 01/18/06
(Security) Keywords: software, database, security
Scheduled batch of patches plugs a large number of security holes in many products, including its database and app server software.
Source: http://news.zdnet.com/2100-1009_22-6027847.html
-
U.K. cops look into face-recognition tech
Date: 01/17/06
(Security) Keywords: database
Police force is investigating whether to add biometrics to a national database of mugshots it is building.
Source: http://news.zdnet.com/2100-1009_22-6027631.html
-
Nearest match bit-string search.
Date: 01/18/06
(Algorithms) Keywords: database
Here's a doozy of a problem. I've been beating my head for a while to come up with the best data structure and/or algorithm for handling this, but I'm drawing a blank.
I have a large number (on the order of 100 million or more) 4096-bit values. I need to store them in a database or similar structure so that given a 4096-bit key, and a number N, I can extract and present all records that contain (in this order)
a) that exact key. b) keys that differ by at most 1 bit. c) keys that differ by at most 2 bits. ... X) keys that differ by at most N bits.
I need the entire thing to be as fast as possible, to the extent that I am willing to burn several hundred gigabytes of storage if that will get me some speed. Any ideas?
Source: http://www.livejournal.com/community/algorithms/70141.html
-
HSQLDB Database Connection Close Doesn’t Write to Disk - Solution
Date: 01/18/06
(Java Web) Keywords: database, sql, java
HSQLDB, the famous fast RDBMS written in Java, introduced a new feature which affects code ported over from previous versions. From version 1.7.2, in-process databases are no longer closed when the last connection to the database is explicitly closed via JDBC. Effectively your data is not written to disk even if you exit the program [...]
Source: http://blog.taragana.com/index.php/archive/hsqldb-database-connection-close-doesnt-write-to-disk-solution/
-
SQL Server Question
Date: 01/18/06
(Asp Dot Net) Keywords: xml, database, asp, web
I'm working on an ASP.Net page that will need to take information from a database, but the information needs to be multi-line, like a numbered list. How would I either store that or display that properly on the web page? Basically part of the output needs to look like this:
Performance Objectives Participant will be able to: 1. Explain the value of standardizing and institutionalizing performance management across all of X 2. Describe the characteristics of a strong performance management culture 3. Explain how to use the tools and processes that will enable differentiation 4. Explain pay for performance and base salary administration
Any suggestions would be useful. I'm not sure how to integrate XML with this since this is so database driven. Thanks.
Source: http://www.livejournal.com/community/aspdotnet/54950.html
-
do you know about binary logs?
Date: 01/19/06
(MySQL Communtiy) Keywords: mysql, database, sql
These tech communities are mostly questions from those that need help which I often do :) I thought it'd be fun to change the pace a little and post some info I think is good to know if your using mysql.
I've recently had problems with table crashes and running mysql in an environment with very little disk space. This has taught me a few things I did not know before hand. One of which is mysql's binary log (also known as the update log in older versions). It stores all statements that are run that could potentially modify data in the database which allows restores to work as best as possible (i.e. even if your backup is a bit old). For more info check the binary log docs
Source: http://www.livejournal.com/community/mysql/83396.html
-
mod_rewrite
Date: 10/19/05
(Apache) Keywords: php, database, web, google, apache
Ok, i am a little new to apache, so go easy on me.
I have an database based website that uses id's to call each page e.g http://www.somesite.co.uk/index.php?id=1
now this i all very nice, but i find that url a little long for me, so i would like to be able to make it into something like http://www.somesite.co.uk/1
now i know this would have implications like if i wanted to sent to a folder past the root, like http://www.somesite.co.uk/images/1.jpg so it would have to have exceptions setup to.
now i have been told that this can be done with a mod_rewrite, but i have spend days pouring over documentation, google hits etc and i have yet to manage to do this. is there anyone out there who has a any clue's?
Thanks for any help
Source: http://community.livejournal.com/apache/26263.html
-
SQL Server Question
Date: 01/18/06
(Asp Dot Net) Keywords: xml, database, asp, web
I'm working on an ASP.Net page that will need to take information from a database, but the information needs to be multi-line, like a numbered list. How would I either store that or display that properly on the web page? Basically part of the output needs to look like this:
Performance Objectives Participant will be able to: 1. Explain the value of standardizing and institutionalizing performance management across all of X 2. Describe the characteristics of a strong performance management culture 3. Explain how to use the tools and processes that will enable differentiation 4. Explain pay for performance and base salary administration
Any suggestions would be useful. I'm not sure how to integrate XML with this since this is so database driven. Thanks.
Source: http://community.livejournal.com/aspdotnet/54950.html
-
First asp.net page - debugging help
Date: 12/23/05
(Asp Dot Net) Keywords: database, asp, sql, microsoft
I'm working on my first asp.net page and am running into some problems. I'm trying to read data from an MS Access database. I'd appreciate if anyone could point me in the right direction - I pretty much lifted the example code from w3schools. Thanks for any help, I'm feeling a bit lost!
The code below gives an error on line 4, character 5 - expected ";".
[%@ Import Namespace="System.Data.OleDb" %> [script runat="server"> sub Page_Load dim dbconn, dbcomm, dbread dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=test.mdb") dbconn.Open() sql="SELECT * FROM values" dbcomm=New OleDbCommand(sql,dbconn) dbread=dbcomm.ExecuteReader() value.DataSource=dbread value.DataBind() dbread.Close() dbconn.Close() end sub [/script>
Database: filename: test.mdb, resides in same directory as index.asp file.
table: values fields: ID, key, value
read [s as <.
Source: http://community.livejournal.com/aspdotnet/52113.html
-
visual stuidio 2005 help
Date: 12/11/05
(Asp Dot Net) Keywords: database, asp, sql
I've created 2 pages, one to display data from a database and another to insert data. I'm having trouble with the sql insert query. The first page displays data fine, not in the format I'd like but one thing at a time.
How do I on the second page, create text boxes and the proper connections to insert data into my database. I'm pretty sure this is a simple basic step but I can not figure it out.
Any help or tutorials? I usually hit www.asp.net when I’m stuck and their tutorial is not helping on this one.
Thanks!
Source: http://community.livejournal.com/aspdotnet/51352.html
-
asp - database connection - help me i'm drowning.
Date: 12/08/05
(Asp Dot Net) Keywords: database, asp, sql, web
hello all.. ok here's the story...
i know some basic asp .. i've edited a database driven website fro a while. I'm no trying to create a new site .. thats also database driven.
How do i connect to the server in order to pull info from it?
I tried following the trail from the site i currently update but i'm not sure what i'm seeing here...
Anyone know how to connect an asp site to a sql 2003 database?
Source: http://community.livejournal.com/aspdotnet/51038.html
-
SqlDataSource UpdateParemeters
Date: 12/06/05
(Asp Dot Net) Keywords: database, sql
FYI: Resolved.
Hey gang,
I'm in the process of fixing an application a former programmer slap together. We found the database design went against company standards, so our DBA went through to fix her up. Now I'm working on the task of fixing the UI code to interact properly with the new changes.
However, I've ran in to a strange behavior with UpdateParameters within my SqlDataSource.
Originally, the Stored Proc calls for the following parameters:
@id int = 0, @original_id int = 0, @original_division_id int = 0, @division int = 0, @division_id int = 0, @revenue_type varchar(100) = '', @revenue_num int = 0
Our DBA changed to:
@original_id int = 0, @original_division_id int = 0, @division int = 0, @division_id int = 0, @revenue_type varchar(100) = '', @revenue_num int = 0
The difference? @id has been removed. (Original programmer wasn't even friggin using it!)
Now I've updated my SqlDataSource UpdateParameters to reflect changes, only to find when running SQL Profiler that my stored proc is being executed with 1 added parameter... @id!!
exec updRevenueType @original_id = 15, @original_division_id = 2, @division = 2, @division_id = 2, @revenue_type = N'Broadcast Designeeee', @revenue_num = 4020, @id = 15
Does SqlDataSource do some weirdness on the background I'm unaware of that looks at the database scheme or something and add it's own parameters? This is rather frustrating trying to find out where this stray parameter is coming from! Anyone else run in to similar behavior?
More info: I'm using C# on .NET 2.0
Source: http://community.livejournal.com/aspdotnet/50533.html
-
Dumb SQL Server Query question
Date: 12/01/05
(Asp Dot Net) Keywords: database, sql
I'm writing a program that does queries on a database, and we just converted to a code-table format (instead of whole strings going in the DB we just put in numbers that reference another table which has all the definitions. Note that these tables are NOT connected (sadly.)) Anyways I'm writing this program that returns data from the database into a datagridview. I've been told that I can't do the conversion on the DataSet or the DGV side and that SQL server needs to do it, so basically I need to write a query that will get all the records that match the request, and then in a particular column, instead of putting in the number that is in teh database, have it look at the code table, find the matching id, and have THAT be displayed instead.
Here's conceptually what I'm going for (this is NOT SQL compliant and my SQL knowledge isn't that great. Hell if it was I wouldn't be here asking this question which I know any standard SQL DB user will likely know the answer to):
SELECT * FROM Table1, Table2 In Table1.Column, instead of showing the code in it, WHERE Table1.Column = Table2.Column(id), Display in Table1.Column the info in Table2.Description.
I realize this is sort of hard to describe in text vs speech. I know there's an easy way to do this with an Inner Join, but that simply adds the info from the 2nd table to the end of the first (and displayed) table.
Here's the SQL code
SELECT * FROM sfrf_request INNER JOIN sfrf_request_type ON CONVERT(int,sfrf_request.request_type)=sfrf_request_type.id WHERE sfrf_request.id = ddl1.SelectedIndex
BTW the CONVERT function is used because the column has string data in it still and thus I can't reference it as an integer.
Any help would be greatly appreciated.
Source: http://community.livejournal.com/aspdotnet/49681.html
-
Retrieving values from DataGridView
Date: 11/21/05
(Asp Dot Net) Keywords: database, web
I'm working on grabbing data from a database and putting it into a DataGridView. My program starts off with 1 DGV, and I want the program to then go to another page that has 3 DGVs on it, all referencing the "id" field from the previous form. Thing is I don't know how I can grab the id value from the DGV. I cant' find a .SelectedValue or .Value of the selected cell.. also this isnt' for a web form, so I don't think I can just do the hyperlink column with a query string on the end of it/passed value. Does anyone know of a way to grab the value of a selected cell? thanks.
EDIT: Nevermind.. I figured it out. Its DataGridView.CurrentCell.Value
Source: http://community.livejournal.com/aspdotnet/48644.html
-
Language Choice
Date: 01/17/06
(WebDesign) Keywords: php, programming, mysql, database, sql, java, postgresql, web, apache
I need some advice in regard to which language to use for developing a
dynamic website. My wife and I are thinking about creating a LMAO website, which will allow people to organize
various LMAO projects. The website will allow users to register, log in, create
projects, join projects, upload pictures, and so on. It's not terribly large
project, but still pretty complicated for people who haven't done any web
development and little programming in general.
The first problem is deciding upon a language to use. The site will, at least
in the beginning, run on our server at home, which is FreeBSD running Apache2
(or anything else we want, to be honest. I'm not giving up FreeBSD, though!). It
looks like all major languages in the field, including PERL, Ruby (and Ruby on
Rails), Python, and PHP work well with Apache, so that shouldn't be a problem.
For the database back-end, we'll be using PostgreSQL or MySQL (if we have to),
both of which are widely supported as well.
My wife doesn't have much experience in programming, so for her it will be
new experience one way or the other. I have some, but still little. The only
language I'm familiar with and can actually write something useful in is Common
Lisp. There exists mod_lisp and a couple of web development frameworks, TBNL and
UnCommon Web, but the process seems hacky -- from what I can tell -- unless one
uses a commercial CL implementations that
cost a lot.
I've looked briefly at Python and Ruby, as well as asked for opinions from
various groups of people (programmers who prefer Lisp, Ruby, or Python), but
it's all still looks like mambo-jumbo to me. The only thing they agree on is
that one should refrain from using PHP for anything non-trivial, so I'm inclined
to believe that. As far as PERL is concerned, I've always had a distaste for it,
so am not all that keen on using it.
Could anyone recommend one of these language, or perhaps another one, that
would be suitable for our needs? I've pretty much made up my mind in regards to
PHP and PERL, so I'm not looking for a debate about why they're good. I also
wish to stay away from Windows-based and Java-based solutions.
Source: http://community.livejournal.com/webdesign/1045210.html
-
Database insert parameters.
Date: 01/09/06
(C Sharp) Keywords: database, sql
Okay, I'm stumped.
I'm using Intersystems Cache, for which there seem to be no peer help fora anywhere on the net, though theoretically it shouldn't matter, should it? ODBC is ODBC, I hope. In any case, here's a quick code snippet:
private void btnSave_Click(object sender, EventArgs e)
{
try
{
string InsertString = "INSERT INTO Erasmus.Publisher(Name, PublisherURL) VALUES(@Name,@URL)";
ErasmusTransaction = ErasmusConnection.BeginTransaction(IsolationLevel.ReadCommitted);
ErasmusInsertCommand = new OdbcCommand(InsertString, ErasmusConnection, ErasmusTransaction);
OdbcParameter prmName = new OdbcParameter();
prmName.Direction = ParameterDirection.Input;
prmName.OdbcType = OdbcType.VarChar;
prmName.Value = txtName.Text;
prmName.ParameterName = "@Name";
ErasmusInsertCommand.Parameters.Add(prmName);
I've also tried it with:
private void btnSave_Click(object sender, EventArgs e)
{
try
{
string InsertString = "INSERT INTO Erasmus.Publisher(Name, PublisherURL) VALUES(@Name,@URL)";
ErasmusTransaction = ErasmusConnection.BeginTransaction(IsolationLevel.ReadCommitted);
ErasmusInsertCommand = new OdbcCommand(InsertString, ErasmusConnection, ErasmusTransaction);
ErasmusInsertCommand.Parameters.Add("@Name", OdbcType.VarChar, 100).Value = txtName.Text;
(hope that formats right.)
Just before we get to the actual query, I've got a messagebox showing ErasmusInsertCommand.CommandText. "@Name" and "@URL" are not switched with the contents of the text boxes on the form (though in all honesty I'm not sure if they should be; perhaps I should be checking the parameter values?). The transaction is rolled back, because the insert command fails. The beginning of the error message (I don't get the whole thing in the message box) is:
ERROR [42000][Cache ODBC][State:37000][Native Code 12] [C:\Documents and Settings\[etc.]] [SQLCODE: -12: A term expected, beginning with one of the following: identifier, constant, aggregate, $$, :, (, +, -, %ALPHALP, %EXACT, %SQLSTRING, %SQLUPPER, %STRING, or %UPPER] [Cache Error: SYNTAXerrdone+1^%qaqqt] [Details: Prepare]
I've left out some greater-than and less-than symbols in order not to confuse LJ.
Despite what I see in the error message, I am hoping against hope this is a generic error message, and someone's gotten it on another database (or that someone here works with Cache). All I get from the Intersystems docs about is is an error reference that gives me the same message, and not what I can do about it. If anyone has any ideas, I'm at my wits' end with this...
oh, yeah: C# 2005 Express Edition, .Net 2.0.
Thanks.
Source: http://community.livejournal.com/csharp/46500.html
|