-
searching by whole words
Date: 11/02/05
(MySQL Communtiy) Keywords: database
Big thanks to jsciv for the help in unfreezing my database after an unsuccessful FULLTEXT indexing!
Now, I have the following query:
SELECT product_id, name, description, title, manufacturer,
warehouse_price, product_markup, supplier_markup, filename,
thumbnail_width, thumbnail_height, sell_price, minimum_price,
item_number, category_key
FROM product
INNER JOIN supplier
ON supplier_key = supplier_id
INNER JOIN picture
ON picture_key = picture_id
WHERE placement_fe = 1 AND
product.active > 0 AND
(name LIKE '%mini%' OR
description LIKE '%mini%' OR
title LIKE '%mini%' OR
manufacturer LIKE '%mini%' OR
product_id='mini' OR
item_number='mini')
Now, my problem is that this will return items with titles like "Feminine" when I really just want titles with the word "mini" in them. Is there an easy way around this or do I have to use regular expressions? If I have to use a regexp, what would you recommend to be the most efficient query to do it? Thanks!
Source: http://www.livejournal.com/community/mysql/72112.html
-
The Mysterious Case of the Unwilling Variables??
Date: 11/04/05
(PHP Community) Keywords: php, mysql, database, sql
Hi, I'm completely stumped over this. I'm probably missing something quite obvious, and I figure it's to do with using global variables.
There is a file, PostDisplay.php. It loops through an array of posts from the database and prints them out. It is independent of the posts themselves and is called by scripts that specify the posts to be printed. Before the loop are the queries to put the posts into an array and count the number of rows (used in the loop).
$array_post = mysql_query($query_post);
$num_post = mysql_num_rows($array_post);
There are two files so far to specify what posts to print. This one, LatestPost.php, works perfectly.
$latest_post = "SELECT * FROM posts ORDER BY id DESC LIMIT 1";
$query_post = $latest_post;
include('PostDisplay.php');
?>
This one, MonthsPost.php, doesn't.
$year = $_GET['year']; # sets the year of the desired posts as a global variable
$month = $_GET['month']; # sets the month of the desired posts as a global variable
$month_post = "SELECT * FROM posts WHERE month=$month && year=$year";
$query_post = $month_post;
include('PostDisplay.php');
?>
The global variables $year and $month are set in the script months.inc.php. Excerpt:
November
The error given upon loading MonthsPost.php is:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in c:\phpdev5\www\new\PostDisplay.php on line 4
(Line 4 is "$num_post = mysql_num_rows($array_post);".)
If anyone is brave/bored enough to read all that and help, thank you. ^_^
Edit: Using mysql_select_db in PostDisplay.php has fixed it, and so I've done something silly with the includes elsewhere. Thanks for all the help ^_^
Source: http://www.livejournal.com/community/php/364431.html
-
Question?
Date: 11/04/05
(Web Development) Keywords: database
Why doesn't this:
function setImage(imgIndex) {
// Change Racial Icon in top right corner based on fkRace value from Database.
document['imgMain'].src = aryImages[imgIndex];
// Change Navagation panel background image to match Body panel image based on fkRace value from Database.
identity = document.getElementById('nav');
newClassName = imgIndex;
identity.className = newClassName;
}
...work in Mozilla Firefox when it works in Internet Explorer? I've been trying to figure it out for a couple of weeks and can't. My only guess is that Firefox doesn't allow the identity.className change?
D
Source: http://www.livejournal.com/community/webdev/265322.html
-
debugging in classic ASP
Date: 11/10/05
(Asp Dot Net) Keywords: php, database, asp
I apologize for the semi-off-topic post but I'm not finding what I need in any other places...
I have some legacy Classic ASP code I need to deal with. In ColdFusion and PHP I can do things like this:
print_r( someComplexDataType )
...and PHP will display not only the data in that structure/query/whatever, but also the names of the colums/members in it as well. So I can get a query back from some arbitrary source, and figure out the names of the database columns returned just by calling that function. Is there a similar thing in Classic ASP? Response.write doesn't seem to work.
thanks.
Source: http://www.livejournal.com/community/aspdotnet/47187.html
-
Free sounds for Web
Date: 11/11/05
(WebDesign) Keywords: database
Hello Folks,
Is there any absolutely FREE sound Database with music loops, that one can use also for commercial projects? I'd be grateful for any tipps!
Source: http://www.livejournal.com/community/webdesign/1015112.html
-
The flip side of database snooping
Date: 02/07/05
(Data Management) Keywords: database
Commentary--Here's why the same features that make databases useful to businesses make them even more attractive to law enforcement.
Source: http://news.zdnet.com/2100-9592_22-5566228.html
-
Sun floats open-source database idea
Date: 02/04/05
(Data Management) Keywords: database
Such a move could trigger displeasure at Oracle but curry favor with open-source advocates.
Image: A Sun database?
Source: http://news.zdnet.com/2100-9592_22-5562799.html
-
Open-source database gets backing
Date: 01/11/05
(Data Management) Keywords: database, sql, postgresql
Pervasive looks to crack the database market with a support offering around open-source database PostgreSQL.
Source: http://news.zdnet.com/2100-9592_22-5519933.html
-
Tripod websites
Date: 11/12/05
(PHP Community) Keywords: php, mysql, database, sql, web
Hello All. Just a short introduction.
I'm Sam, 17 years of age from England. I'm currently a student, and am soon to leave for university to study computer gsmes development, which should be fun.I've been teaching myself php along with MySQL for about a week now, and all has been pretty good so far. It's surprising how simple php really is.
Now thats over with, I have a small problem. I'm not sure if this is the right place to ask, but here goes:
Does anybody have any experience making websites hosted by the free lycos tripod service? If so, how do you get php to communicate with MySQL in it? I've created a site that works fine on the test server I've created, but as soon as I upload it to tripod, it just stops working. The lycos help page said it would automatically connect to and select your database at the beginning of the script, so I figured you just skip all the mysql_connect() stuff and start straight away with the queries, however it still doesnt work. I know for a fact my query is fine, as I copied and pasted it straight into the mysql client and it all worked beautifully.
If all else fails, could you recommend a good, preferably free php and MySQL webhost?
Thankyou Greatly
Sam
Source: http://www.livejournal.com/community/php/366601.html
-
Concurrent Access (In Access)
Date: 11/16/05
(Software) Keywords: software, database
Hello.
In an effort to speed up the process (and eliminate the amount of dead tree used) in the course of monitoring my work, I decided to not bother with the paper forms my precessor had been using.
I decided that a Access Database was the way forward (simple to use, and the Access software is on all the computers at work here). For the first couple of weeks I was here, this worked fine, as there was only me using it, and it was on 'my' network drivespace. This morning I was granted access to the shared filespace. This meant that myself and my colleague will be able to use the database.
Now, the problem I have is that sometimes, things that he has entered don't show up, and things that I have altered don't show up. I have had a look at 'help', and it suggested using 'Records -> Refresh' to make any changes show up. I added a button to the form (which looks like this) to make this simpler.
I'm not 100% convinced that this is working 100% of the time. Is there a way of forcing the database to refresh itself, so that the most recent version of the table containing the data is always the most recent?
(x-posted to journal)
Source: http://www.livejournal.com/community/software/59343.html
-
How To Search Non-Copy Protected Music CD’s Only Or Even Tabulate Copy Protected Ones
Date: 11/16/05
(Java Web) Keywords: technology, database, virus, web
Copy-Protection recently came to limelight as Sony used DRM technology to copy-protect its CD's which makes them vulnerable to viruses and malware.
This website allows you to search for music CD in Amazon database which do not have any kind of copy-protection enabled. This may come in handy if you want to verify if your [...]
Source: http://blog.taragana.com/index.php/archive/tool-to-search-for-non-copy-protected-music-cds-or-tabulate-copy-protected-ones/
-
Project Management
Date: 11/17/05
(PHP Community) Keywords: database, sql, web, linux
Second post today, I knew there was something else. I just wondered how does everyone go about managing there projects? I've been given the task of redoing my companies database delivery system (wow such an impressive title) basically converting all the Access databases we have into webbased sql databases and front ends, but this project is going to be huge (with a team of around 3 of us, for a 3000user base, yes, this isn't going to work) and I thought my current system of a folder and dropping scripts into just wont cut it, esp for revision control so is it possible or does anyone use cvs or svn for revision control or something simular. I would like something easy but at the end of the day whatever works. I could use a linux box but it's all windows servers so something that can work on windows would be better, which is a shame.
Any ideas is greatly appreciated.
Source: http://www.livejournal.com/community/php/368626.html
-
Url location
Date: 11/17/05
(PHP Community) Keywords: php, mysql, database, sql
Hello everyone
This is my first post here so please go easy on me. I've been using/developing php for little over a year now, simple things (help desk, asset database) for my company. But there is 1 thing that has always bugged me and I can't find out how to do it.
I've noticed on some site's (blogs and php.net) that they dont have the usually page url, such as
http://www.somedomain.com/pages/about.php
but more like
http://www.somedomain.com/about/
or blog entries like
http://www.somedomain.com/blog/2005/11/09/
I just wondered how do they do that? I don't think they create a new directory for each entry or am I wrong there?
I know that is kinda of a vague question, it's just im redoing my blog atm (i use mysql for storing all my entries) and at the moment the url is usually like http://www.somedomain.com/blog/id=23232 < entry number
I'd really like to change that to http://www.somedomain.com/blog/2005/11/09.
If anyone can help that would be great
Source: http://www.livejournal.com/community/php/368298.html
-
Of Character Encodings
Date: 11/18/05
(C Sharp) Keywords: database, asp, sql, web
I am converting a web app from ASP to ASP.net and have stumbled on an annoying problem.
1. ASP code accepts user input and stores value in the database
SQL field type is nvarchar(200).
BUT the query does not use N'' to specify that the string is unicode.
2. Value stored in the database is '陳å°æ˜¥'
3. Value displayed on web page (utf8 encoding, no server side changes) is '陳小春'
4. Actual UTF data in the database is displayed on screen as ???
(database value: 人, display value: ?)
5. ASP.net application using the EXACT same queries results in point 4 being displayed correctly (as japanese) but the values that were displayed correctly in the ASP app are now exactly as they are in the database.
Please Help ... My only guess was that the ADO connection was converting the UTF in the database to Non-UTF for display in ASP and the ADO connection in .Net is preserving the Unicodeness of it.
But i did a simple test in ASP where i selected the data, stored it in a variable and then inserted back into the database (non using N'')
and well ... i got the exact same .... japanese was japanese the rest was garbage.
Anyone have any ideas???
Source: http://www.livejournal.com/community/csharp/41546.html
-
This thing ROCKS!
Date: 11/18/05
(SQL Server) Keywords: database, sql, security, google
http://www.sqledit.com/dg/
Yesterday after lunch, I got one of those famous, hurried "critical" requests to export some data to a vendor for an important project. Someone from our Stock Administration team insisted on meeting with me to give me a USB drive to get the database image. Apparently, they needed someone to import the data on our system, then export it in a format requested by the vendor in order to test and configure a new offering for us.
I was already irritated that yet another team had failed to document and obtain resources for their data requirements, therefore making an emergency for me that very important people would hear about if I didn't follow through. I did what I aways do, I said I'd look at it and see what could be done. Oh man...you know what I saw? This dude had been walking around all over the place with this little flash drive in is pocket with stock administration data for EVERYONE IN OUR COMPANY. This data included Social Security Numbers, Birthday's, Names, Addresses, Salaries, and Stock Options. AND he wanted me to just send it off to some company to play around with. I was pretty mad, especially when he had his manager call me to complain.
I explained that this was in violation with our SOX commitments and that the data would have to be at the very least cleansed before it was sent out. I also mentioned that I didn't particularly want my SSN sent to parts unknown for a proof-of-concept project. After that I found a kind way of mentioning that carrying around sensitive data in an unsecure format is grounds for termination. Then his manager called the CIO. All the better, at least the CIO understands INFORMATION and the protection thereof!
I didn't have a clue how to cleanse data, but it had to get done fast, so I did a google search for tools, and I found this little gem. The DTM Data Generator contained a robust set of tools for analyzing the SQL tables field by field, while retaining the referential integrity. It's very versatile. I'm definately going to use this again. I think I might finally generate those mean sets of data for our QA team to test against. This tool rocks.
Source: http://www.livejournal.com/community/sqlserver/37213.html
-
reading MS Word files
Date: 11/20/05
(PHP Community) Keywords: php, database
I built a template in PHP that allows the client to create / update lists of actors with their pictures and resumes. When creating or updating a resume, the client has to copy and paste the year, the name of the movie and additional information in 3 separate fields. The content is then added to the actor's personal table in the database.
Now the client thinks it's very boring to proceed this way, and would like to be able to just copy and paste the whole resume (or upload it as a word file).
Is it possible to do this using php ? I am no php god, I read articles about COM that suggested it was possible.
Any suggestion would be much appreciated !
Thx all
Source: http://www.livejournal.com/community/php/369708.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.
Source: http://www.livejournal.com/community/aspdotnet/48644.html
-
Images in reportviewer reports
Date: 11/24/05
(C Sharp) Keywords: database
Is there a way to get an image to show on report from an Object source, not database?
The only way I could organize this now is saving an image in file system and passing a link to the file into the imagebox on report. Any better solutions? Can it accept Image or Bitmap types somehow?
Source: http://www.livejournal.com/community/csharp/43124.html
-
Any PHP Gurus wanna answer a question for me?
Date: 11/26/05
(Computer Geeks) Keywords: php, programming, mysql, browser, html, database, asp, sql
I've done plenty of ASP.NET programming but this is my first foray into the wonderful land of PHP and I've got a question about how often you hit the database in a normal page load... basically I have tags like:
within the front end page and listing.php goes something like
$database = mysql_connect("localhost", "your_database_user_id", "your_database_password");
mysql_select_db("your_database_name", $database);
switch($type){
case 'thumbnail':
header("Content-type: image/jpeg"); // act as a jpg file to browser
$query = "SELECT thumbnail
FROM your_table
WHERE id = $id";
$result = mysql_query($query, $database);
$row = mysql_fetch_array($result);
$jpg = $row["thumbnail"];
echo $jpg;
break;
case 'address':
header("Content-type: text/html"); // act as an html file to browser
$query = "SELECT address
FROM your_table
WHERE id = $id";
$result = mysql_query($query, $database);
$row = mysql_fetch_array($result);
$address = $row["address"];
echo $address;
break;
}
Now if I understand this correctly, anytime the parser hits a tag (or w/e) it will connect to and select from the database. So on a page with 5 tags that pull from listings.php, the scripts will connect to, select from and disconnect from the database 5 times right? Is this is proper way to do things? It kinda makes me uncomfortable to make so many database hits but this seems to be the average way php developers do it.
Source: http://www.livejournal.com/community/computergeeks/824527.html
-
Sending a weekly email based on predefined search criteria
Date: 11/29/05
(PHP Community) Keywords: mysql, database, sql, web
Need some tech help and pointers.
My client is asking to send users an email every week, automatically. I have no clue how to do this.
The content of that email will be created by doing a search of a MySQL database.
If anyone knows how to do this or can point me some where useful, I'd appreciate the help.
[UPDATE you guys are making me laugh, relieving a lot of stress]
I could set up an event to run from my iCAL that loads a web page!
Source: http://www.livejournal.com/community/php/371609.html