|
-
Question on queries and links
Date: 05/05/06
(PHP Community) Keywords: php, database, sql
Hey guys! I'm working on a project for my company, and running into a big of a block. Let's just say I'm a newbie at PHP, but intermediate on SQL.
The project I'm working on is to create a PHP/SQL system that we can enter outage ticket information into, and then query the database of tickets. I've got the query working, however with all the data that's being put in, it spreads the table way out over to the right and makes me have to scroll to see the rest of the info. Which is a pain.
What I'd like to do is have it query the information, and in the ticket# field have it hyperlink the # so that people can click the # and it'll query the database for all the information related to that ticket.
Any thoughts on how to accomplish this easily?
Thanks, Chris
Source: http://community.livejournal.com/php/447603.html
-
moving hosts
Date: 05/07/06
(MySQL Communtiy) Keywords: php, mysql, database, sql, web
I'm currently moving hosts, from a host with mySQL 4.1.18 to 4.0.25. The site was made with a php templating program called website baker. For some reason when I backup the database in mySQL 4.1.18 (with compatibility for earlier versions) and I try to upload the database using cpanel in the new one, it just doesn't recognize anything and won't restore the database. Any ideas on how I could get around this?
x posted in mysql and php_mysql
Source: http://community.livejournal.com/mysql/95054.html
-
Creating a new table...
Date: 05/06/06
(MySQL Communtiy) Keywords: php, sql
Ok, I'm a newbie at this so I'm not sure what to do. I've got a MOD for a phpBB forum I run, and it says the following:
#-----[ SQL ]------------------------------------------ # CREATE TABLE phpbb_invitations ( invitation_id MEDIUMINT( 8 ) NOT NULL AUTO_INCREMENT , invitation_code VARCHAR( 8 ) NOT NULL , invitation_description TEXT NOT NULL, invitation_uses MEDIUMINT(8) NOT NULL DEFAULT '1', invitation_group MEDIUMINT(8) NOT NULL DEFAULT '0', invitation_email TEXT NOT NULL, PRIMARY KEY ( invitation_id ) );
CREATE TABLE phpbb_invitation_users ( invitation_id MEDIUMINT( 8 ) NOT NULL, user_id MEDIUMINT( 8 ) NOT NULL, PRIMARY KEY ( user_id ) );
INSERT INTO phpbb_config ( config_name , config_value ) VALUES ('invite_only', '1');
I'm not sure how to do this, but I'm thinking that I have to go into the phpMyAdmin on my server and create the "phpbb_invitations" table first, then past in this code.... right? Wrong?
Much thanks in advance for you help. Kristi
Source: http://community.livejournal.com/mysql/94911.html
-
Mysql Question...
Date: 05/06/06
(MySQL Communtiy) Keywords: php, mysql, database, sql
I'm currently developing a small community site (WOW Guild site), and am working on optimizing the database calls and such.
Currently, when a user loads a page the system checks the user's authentication, and then to see who else is online, checks a field in the db to see how many people have a comparable time...:
- user loads page > SELECT * FROM `Members` WHERE `name`=$name AND `pass`=$pass
- update user > UPDATE `Members` SET `lastclick`=$now WHERE `id`=$id
- find other users online > SELECT `id` FROM `Members` WHERE `lastclick` >= $now
I was curious if there was a way to simplify this process... Thanks for anyhelp you guys can give me.
(x-posted: mysql, php_mysql )
****Update: I neglected to mention that $now is stored as 3 minutes in the future, so that the third returns all users registered as authenticated now or 3 minutes from now.
$now is also not a traditional timestamp, but a whole-number representation created from a timestamp.
The code already works, just trying to slim the query number down if possible...
Source: http://community.livejournal.com/mysql/94558.html
-
VB.Net used to add files to SQL Server
Date: 05/09/06
(Asp Dot Net) Keywords: database, asp, sql, web
Christ I post so much to this group that its like if I keep doing it I'm automatically entered in a raffle..
Anyways I have a ASP.Net/VB.net webform that allows a user to upload a file into a SQL Server database. I can't figure out how to get the file to be inserted correctly though. We have to use a data access class, but I can modify it to my needs. I also need to pass this to a stored procedure on the database, as opposed to using commands in the vb code.
This is how I get the file: Dim strFileName As String = _ fileupload1.PostedFile.FileName.Substring _ (fileupload1.PostedFile.FileName.LastIndexOf("\") + 1) Dim fileLength As Integer = CInt(fileupload1.PostedFile.ContentLength) Dim fileContent(fileLength) As Byte fileupload1.PostedFile.InputStream.Read(fileContent, 0, fileLength)
I keep getting all sort of casting errors and other crap when I try and pass this through my stored procedure. I don't think my error lies in there, because it looks like its not being "converted" to the proper format or it just isn't going over properly. I can't seem to find any tangible "good" info online about this. Can anyone help out? Thanks.
Source: http://community.livejournal.com/aspdotnet/65161.html
-
Question: Getting back what I just did... PHP_MySQL
Date: 05/10/06
(PHP Community) Keywords: mysql, sql
Hello all. I hope this isn't too Newbie-ish.
I have a table in MySQL called "Entity" that has the following columns:
Entity_UID - int 50 Not Null Auto Inc foo - date recordCreated - dateTime
So the question is: if I do:
$query = "INSERT INTO Entity VALUES (NULL, '2005-12-25', NOW())";
$result = mysql_query($query);
What is the easiest way to get back the Entity_UID of the record I just created?
Source: http://community.livejournal.com/php/449188.html
-
Domain
Date: 05/15/06
(Web Development) Keywords: php, mysql, sql, web, hosting
Who has the best deal around for domain transfer & webhosting? DNS, PHP, MySQL (5-DB or more), High Bandwidth 50-GB or more (Media Downloads)
I use iPowerWeb for everything at the moment (I use to work there)
Source: http://community.livejournal.com/webdev/320489.html
-
How To Create AJAX Commenting System for Static HTML Pages
Date: 05/15/06
(Java Web) Keywords: mysql, html, database, sql
I wanted to create ajax based commenting system for some html pages. The design goals were:
1. Simple to use and install
2. Database (MySQL) backed
3. Minimal changes to HTML template / files
4. Support effective (no frequent cache refreshes) html page compression / caching strategy for heavily commented sites.
An AJAX based system fits the bill. The new [...]
Source: http://blog.taragana.com/index.php/archive/how-to-create-ajax-commenting-system-for-static-html-pages/
-
looking for a good, free GUI mysql client for windows
Date: 05/16/06
(MySQL Communtiy) Keywords: php, mysql, browser, database, sql, web
I'm currently working on re-engineering a web stack completely to use mysql as a back end instead of (shiver) a bunch of Access files. I've used mysql for years both personally and professionally, but being a UNIX dork I've almost exclusively done so from the command line. Whenever I've needed something a little more user-friendly than that, I've installed a web tool like phpmyadmin.
However in this case, I'm working in an all-Windows shop (mostly server 2003) and I know that I'm going to be passing this on to someone in a couple years. As I document various tasks, I'd like to use a desktop client with a GUI interface for doing things like "browsing" the database, modifying stuff now and then, etc.
I see that mysql.com has a nice "administrator" and "query browser" available and they're pretty nice - but neither is really what I'm looking for in terms of something that has a GUI interface and actually manipulates the data itself. Unfortunately I cannot count on a successor knowing much SQL or being comfortable on the command line.
I'm guessing there are many free tools out there but would love to start out on whatever people who already love to use such things find the most mature, featureful, easy to use, etc. So, any suggestions? TIA!
EDIT - solved, thanks!
Source: http://community.livejournal.com/mysql/95405.html
-
Question for all the smart people
Date: 05/18/06
(PHP Development) Keywords: php, mysql, sql
The company that I work for hired someone to write an application that tracks the business. She is developing it in PHP/MySql on her local Windows box using Dreamweaver's code snippets. I have never used the code snippets in Dreamweaver mostly because I preferred to write the code myself so that I knew what I was getting. There are no comments in her code and I am afraid that at some point I am going to inherit this mess.
So my question is, have any of you ever used these code snippets to write large applications that need to be secure enough to store credit card numbers and sensitive client information as well as the companies financial records. The site may at some point be hosted on the internet so that remote users can access it as well.
Thanks.
Source: http://community.livejournal.com/php_dev/68168.html
-
skip networking in windows, worth it or no?
Date: 05/18/06
(MySQL Communtiy) Keywords: mysql, browser, sql, web
Hey folks, another newbie-to-mysql-on-windows question here, and many thanks again to the help on my previous one...
In my previous mysql experience on unix-like platforms, it was generally considered a Good Thing to turn off networking if you didn't "need" it, just talking directly to the mysqld instead. In cases where a local web stack on the same box was all that ever needed to talk to mysql, this worked well, and unless I'm smoking crack, it even seemed to perform a little better than chatting on 3306 using TCP/IP and worrying about telling either the daemon or the firewall (or both) to restrict such conversations to localhost.
Somewhat naively, I tried to do this in Windows today and got some unexpected results.
I'm working with an old version of coldfusion and modern mysql and recently discovered that rather than the "use an old version of Connector J" method mentioned in the Macromedia knowledge base, I can just install the nice current version of the mysql ODBC Connector, then set up a system DSN right in Windows. I tell coldfusion to use this "ODBC socket" and poof, things seem pretty quick. So great, I think, now that I'm not using the old Connector J which seemed to require a TCP/IP method, now I should be able to skip networking in the mysql daemon and just tell the system DSN config where the "socket" is.
Not so simple! I turned off networking (using mysql Administrator, since I'm trying to "be GUI" about this) and as expected, it uncommented "skip networking" in the my.ini file. However, after this, Windows couldn't start the mysql service anymore. Furthermore, the Administrator and Query Browser didn't seem to be able to connect without a port number. As soon as I re-enabled networking by editing the my.ini file, everything was fine.
Did I miss something? Am I smoking crack? Should I just leave well enough alone and use networking with mysql configured to only allow connections from localhost and Windows told not to expose 3306 to the outside world?
All opinions welcome - just please don't suggest "use something other than crutsy old cold fusion" because unfortunately that's not really an option. TIA!
Source: http://community.livejournal.com/mysql/95724.html
-
Serious scaling for open source databases
Date: 05/24/06
(Open Source) Keywords: technology, sql, postgresql
Greenplum partnered with a business analytics consultant, Daxby to come up with something that could run on a collection of low-cost servers. It wasn't cheap, but the underlying technology was still PostgreSQL.
Source: http://blogs.zdnet.com/open-source/?p=661
-
2.0 postbacks
Date: 05/25/06
(Asp Dot Net) Keywords: sql, microsoft
Ok, so I have a reset button on my page and I am rerunning my sql queries and everything to get the original values back into the textboxes the user is allowed to modify. At first, I was calling my sql queries in the page_load event when they clicked reset. Even though I was resetting all the values of the textboxes, and these textboxes are created dynamically, it was keeping the modified user values. When I moved my sql calls to the reset button event handler, and put an ispostback check into my page_load, it then reverted back to the original values and worked the way i wanted it to. This is really weird. If you are reloading your page completely, why would it hang on to the modified values? Now I have a save button that I want to click and be able to get all the new values. But if I put it in my event handler, I will get the old values, just like when I click reset. Damn you microsoft....
Source: http://community.livejournal.com/aspdotnet/68561.html
-
Sorting by userID
Date: 05/25/06
(Asp Dot Net) Keywords: sql, security
I'm trying to sort by domain user id, I can pull the user id fine but now I want to sort my SELECT by that name. How do I put the value of getUserIdentity into my SELECT statment.
Thanks
protected string getUserIdentity() { return HttpContext.Current.User.Identity.Name.ToString().Replace("DOMAIN\\", ""); }
protected void Page_Load(Object sender, EventArgs e) { username = getUserIdentity(); SqlConnection myConnection = new SqlConnection("Data Source=CLIENTELE;Initial Catalog=forms;Integrated Security=True"); SqlDataAdapter myCommand = new SqlDataAdapter("SELECT * FROM formTable WHERE userID = @username ORDER BY status DESC", myConnection);
DataSet ds = new DataSet(); myCommand.Fill(ds, "names");
MyDataGrid.DataSource=ds.Tables["names"].DefaultView; MyDataGrid.DataBind(); }
Source: http://community.livejournal.com/aspdotnet/68149.html
-
The Blogger of DOOM!
Date: 05/25/06
(PHP Community) Keywords: html, database, sql, security
Currently I'm working on a small and simple blogger for someone. It doesn't have to be anything extraordinary or anything, however, of course, I want it to be as secure as possible within my means.
I've heard all of the horror stories of SQL injection and whatnot where users input bad things to make bad things happen and that there is a general rule about NEVER letting the user input directly into a database without cleaning it up.
Well... in this case, it isn't that simple.
I don't want to really limit what characters the user can enter in (except for html.. That I'm stripping out). But, I don't want to limit it to alpha-numerical characters. So, I thought of another way where the user has more freedom, but I'm hitting some walls with it... and perhaps some of you could let me know if you see any glaringly obvious problems.
I was thinking of having the users input sent to a text file. A file, automatically named, maybe by timestamp or whatever, that contains the text the user has entered. Then, the DB would only contain the name of the file created, its ID number, and the user associated with it. Then, when viewing them, simply pull the name of the file from the DB, fopen and fread it and echo the results. I have the open and reading part working, however... I want to avoid people being able to go to that file directly (by some stroke of luck by guessing its name). So... my two concerns are:
1. Are there any obvious security issues by doing this with external files? 2. Is there any way I can prevent direct opening of these files?
Thank you in advance.
Source: http://community.livejournal.com/php/453279.html
-
Software already installed? (No!)
Date: 05/25/06
(SQL Server) Keywords: software, xml, database, sql, microsoft
Okay. So I've been trying to install SQL Server 2005 for about a month now, on and off. I keep running into the usual problems. My boss wants it installed now now now, so this time I went whole hog. I uninstalled everything remotely Microsoft (including all versions of Visual Studio, all versions of the .NET framework, Office, and a bunch of little add-ons I assumed went to Visual Studio, like WSE and the XML parsers) from the machine. I physically deleted every file I could from the C:\Program Files\Microsoft SQL Server directory. (instapi.dll, from the Microsoft SQL Server\90 directory could not be deleted, no matter what I did, but everything else went away). I try to install, and when I get to the point where it's actually going to install the software< I get the following dialog box:
The following components that you chose to install are already installed on the machine. To view a report of available options and alternatives click on Details. SQL Server Database Services 9.00.1309.06 Analysis Services 9.00.1309.06 Reporting Services 9.00.852 Notification Services 9.00.852 Integration Services 9.00.852 Workstation Components, Books Online, and development tools 9.00.852
Each of these has a checkbox next to it, but all the checkboxes are blank. When I hit Next, I get the following dialog box: None of the selected features can be installed or upgraded. Setup cannot proceed since no effective change can be made to the machine. To continue, click Back and select features to install.
Now, I know the physical fiels aren't there, since I uninstalled the software and then deleted any artifactas, so the problem must be that there are some stray registry keys telling the install procedure that the software still exists on the machine. Does anyone have a comprehensive list of registry keys written by SQL Server 2005, so I can make sure everything is gone before I try this again?
Source: http://community.livejournal.com/sqlserver/48457.html
-
How To Process MySQL Timestamp in PHP
Date: 05/27/06
(Java Web) Keywords: php, mysql, sql
Many of us do not realize that MySQL’s Timestamp is not the timestamp which PHP date() understands. In fact if you try to use MySQL timestamp directly in php date() function then you will get totally wrong dates. There is a simple way to use MySQL timestamp data in php.
First you need to modify the [...]
Source: http://blog.taragana.com/index.php/archive/how-to-process-mysql-timestamp-in-php/
-
Books for sale
Date: 05/30/06
(WebDesign) Keywords: asp, sql
I just graduated from college, and I have scads of techie-type textbooks I need to get rid of. I have them listed on half.com right now, but I'll sell through here (paypal only) if anyone is interested, and I'm willing to accept offers. If this is a no-no in the community, plz delete this. Thanks y'all!
- Adobe Photoshop 6.0 Classroom in a Book + CD - $7
- Adobe InDesign 1.5 Classroom in a Book + CD - $2
- Adobe Photoshop 6.0 and Illustrator 9.0 Classroom in a Book + CD - $3
- How to Cheat in Photoshop CS2 + CD - $12
- Illustrator CS for Windows and Macintosh - $22
- Macromedia Dreamweaver MX Dynamic Applications + CD - $15
- ASP.NET Developer's Jumpstart - $20
- Guide to SQL - $6
I'm willing to negotiate prices. Stuff may not be for sale at any time (this is x-posted).
Source: http://community.livejournal.com/webdesign/1116954.html
-
Books for sale
Date: 05/30/06
(Web Development) Keywords: asp, sql
I just graduated from college, and I have scads of techie-type textbooks I need to get rid of. I have them listed on half.com right now, but I'll sell through here (paypal only) if anyone is interested, and I'm willing to accept offers. If this is a no-no in the community, plz delete this. Thanks y'all!
- Adobe Photoshop 6.0 Classroom in a Book + CD - $7
- Adobe InDesign 1.5 Classroom in a Book + CD - $2
- Adobe Photoshop 6.0 and Illustrator 9.0 Classroom in a Book + CD - $3
- How to Cheat in Photoshop CS2 + CD - $12
- Illustrator CS for Windows and Macintosh - $22
- Macromedia Dreamweaver MX Dynamic Applications + CD - $15
- ASP.NET Developer's Jumpstart - $20
- Guide to SQL - $6
I'm willing to negotiate prices. Stuff may not be for sale at any time (this is x-posted).
Source: http://community.livejournal.com/webdev/324877.html
-
Classes and Include Files
Date: 05/31/06
(Asp Dot Net) Keywords: asp, sql, web
I am new to ASP.NET... jumping on board with 2.0. I am from a VBScript ASP Background the last 6 years.
Here is my problem, in the past when I needed to reuse some code I just popped her into an include file and kept using it over and over again.
Now that I am in ASP.NET, I am attempting to teach myself how to use a Class file or determine the correct way of doing what I had done in the past, but so far I have yet to A) Make it work and/or B) Find documentation.
I grabbed 2 separate books on ASP.NET and they only gloss over the uses of Class files. On the other hand they were immensely instrumental with getting me almost up to speed.
For instance, I want to reuse a connection string and SQL Statement in various areas of a project. I want to declare this somehow 1 time and then call it in all of my Subs or Functions that need it. Sure ASP.NET 2.0 will allow me to do this with the GridView and the Web.Config file, but I am really looking to avoid this.
I have TONS of classic ASP pages I need to, over time, fix up and port to ASP.NET and it would help if I have much of the work done, by eventually pointing them to this 1 file.
Any links that someone can post would be a massive help.
I am also looking for documentation on how to use Master Pages.
Thank you again.
Source: http://community.livejournal.com/aspdotnet/69254.html
|