Search Results

Search found 10177 results on 408 pages for 'thumbs db'.

Page 59/408 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • ISBNs are used as primary key, now I want to add non-book things to the DB - should I migrate to EAN

    - by fish2000
    I built an inventory database where ISBN numbers are the primary keys for the items. This worked great for a while as the items were books. Now I want to add non-books. some of the non-books have EANs or ISSNs, some do not. It's in PostgreSQL with django apps for the frontend and JSON api, plus a few supporting python command-line tools for management. the items in question are mostly books and artist prints, some of which are self-published. What is nice about using ISBNs as primary keys is that in on top of relational integrity, you get lots of handy utilities for validating ISBNs, automatically looking up missing or additional information on the book items, etcetera, many of which I've taken advantage. some such tools are off-the-shelf (PyISBN, PyAWS etc) and some are hand-rolled -- I tried to keep all of these parts nice and decoupled, but you know how things can get. I couldn't find anything online about 'private ISBNs' or 'self-assigned ISBNs' but that's the sort of thing I was interested in doing. I doubt that's what I'll settle on, since there is already an apparent run on ISBN numbers. should I retool everything for EAN numbers, or migrate off ISBNs as primary keys in general? if anyone has any experience with working with these systems, I'd love to hear about it, your advice is most welcome.

    Read the article

  • Why is PHP5 SQLite PDO silently failing on DB connection?

    - by danieltalsky
    I have no idea why my code is failing silently. PDO and PDO SQLite are confirmed loaded. Errors are turned on and OTHER errors display. The SQLite file exists. Perms are set correctly. If I change the filename, PHP actually DOES create the file but still fails silently. No output or commands are excecuted after the "$dbh = new PDO($db_conn);" command. I'm not sure what else I can possibly do to troubleshoot. What else... this is on Modwest shared hosting. ABOUT TO RUN <?php // Destination $db_name = '/confirmed/valid/path/DBName.db3'; $db_conn = 'sqlite:' . $db_name; try { var_dump($db_conn); $dbh = new PDO($db_conn); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (Exception $e) { exit("Failed to open database: {$e->getMessage()} \n" ); } ?> THIS NEVER OUTPUTS! sdf

    Read the article

  • What arguments to use to explain why a SQL DB is far better then a flat file

    - by jamone
    The higher ups in my company were told by good friends that flat files are the way to go, and we should switch from MS SQL server to them for everything we do. We have over 300 servers and hundreds of different databases. From just the few I'm involved with we have 10 billion records in quite a few of them with upwards of 100k new records a day and who knows how many updates... Me and a couple others need to come up with a response saying why we shouldn't do this. Most of our stuff is ASP.NET with some legacy ASP. We thought that making a simple console app that tests/times the same interactions between a flat file (stored on the network) and SQL over the network doing large inserts, searches, updates etc along with things like network disconnects randomly. This would show them how bad flat files can be espically when you are dealing with millions of records. What things should I use in my response? What should I do with my demo code to illustrate this? My sort list so far: Security Concurent access Performance with large ammounts of data Ammount of time to do such a massive rewrite/switch Lack of transactions PITA to map relational data to flat files I fear that this will be a great post on the Daily WTF someday if I can't stop it now.

    Read the article

  • What causes subprocess.call to output blank file when attempting db export with mysqldump?

    - by caldazar
    I am having some problems using subprocess.call to export a database using mysqldump. I'm using Python 3.1 installed on Windows 7. from time import gmtime, strftime import subprocess DumpDir = "c:/apps/sqlbackup/"; DumpFile = "mysqldump-" + strftime("%Y-%m-%d-%H-%M-%S", gmtime()) + ".sql"; params = [r"mysqldump --user root --password=mypassword --force --flush-privileges --compress --comments mydatabase --result-file=" + DumpDir + DumpFile]; subprocess.call(params, shell=True); The above code causes a blank file to be created in the DumpDir. I've tried getting python to print the command so I can test it via the CMD prompt using: print(subprocess.list2cmdline(params)); If I paste the output to the CMD prompt and execute it, everything works fine. Any ideas? I'm new to Python, so I am sure the answer is simple but I've tried so many variations to get this working that I just can't figure this out.

    Read the article

  • What's wrong with this code? Values not saved to db

    - by Scott B
    Been trying to get this code to work for several days now to no avail. I'm at wits end. I've managed, with the code below, to create a customized category picker widget that appears on the PAGE editor. However, for the life of me, I cannot get the checked categories to save. function my_post_options_box() { if ( function_exists('add_meta_box') ) { //add_meta_box( $id, $title, $callback, $page, $context, $priority ); add_meta_box('categorydiv', __('Page Options'), 'post_categories_meta_box_modified', 'page', 'side', 'core'); } } //adds the custom categories box function post_categories_meta_box_modified($post) { $noindexCat = get_cat_ID('noindex'); $nofollowCat = get_cat_ID('nofollow'); if(in_category("noindex")){ $noindexChecked = " checked='checked'";} else {$noindexChecked = "";} if(in_category("nofollow")){ $nofollowChecked = " checked='checked'";} else {$noindexChecked = "";} ?> <div id="categories-all" class="ui-tabs-panel"> <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> <li id='category-<?php echo $noindexCat ?>' class="popular-category"><label class="selectit"><input value="<?php echo $noindexCat ?>" type="checkbox" name="post_category[]" id="in-category-<?php echo $noindexCat ?>"<?php echo $noindexChecked ?> /> noindex</label></li> <li id='category-<?php echo $nofollowCat ?>' class="popular-category"><label class="selectit"><input value="<?php echo $noindexCat ?>" type="checkbox" name="post_category[]" id="in-category-<?php echo $nofollowCat ?>"<?php echo $nofollowChecked ?> /> nofollow</label></li> <li id='category-1' class="popular-category"><label class="selectit"><input value="1" type="checkbox" name="post_category[]" id="in-category-1" checked="checked"/> Uncategorized</label></li> </ul> </div> <?php }

    Read the article

  • Application Design: Single vs. Multiple Hits to the DB

    - by shyneman
    I'm building a service that performs a set of configured activities based on the type of request that it receives. Each activity involves going to the database and retrieving/updating some kind of information. The logic for each activity can be generalized and re-used across different request types. The activities may need to participate in a transaction for the duration of the servicing the request. One option, I'm considering is having each activity maintain its own access to DAL/database. This fully encapsulates the activity into a stand-alone re-usable piece, but hitting the database multiple times for one request doesn't seem like a viable option. I don't really know how to easily implement the concept of a transaction across the multiple activities here either. The second option is to encapsulate ALL the activities into one big activity and hit the database once. But this does not allow re-use and configuration of these activities for different requests. Does anyone have any suggestions and input about what should be the best way to approach my problem? Thanks for any help.

    Read the article

  • Should I be regularly shrinking my DB or at least my log file?

    - by Tom
    My question is, should I be running one or both of the shrink command regularly, DBCC SHRINKDATABASE OR DBCC SHRINKFILE ============================= background Sql Server: Database is 200 gigs, logs are 150 gigs. running this command SELECT name ,size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int) / 128.0 AS AvailableSpaceInMB FROM sys.database_files;` produces this output.. MyDB: 159.812500 MB free MyDB_Log: 149476.390625 MB free So it seems there is some free space. We backup transaction logs every hour, diff backup 5 nights a week, full backup the other 2 nights of the week.

    Read the article

  • Rails link from one model to another based on db field?

    - by Danny McClelland
    Hi Everyone, I have a company model and a person model with the following relationships: class Company < ActiveRecord::Base has_many :kases has_many :people def to_s; companyname; end end class Person < ActiveRecord::Base has_many :kases # foreign key in join table belongs_to :company end In the create action for the person, I have a select box with a list of the companies, which assigns a company_id to that person's record: <%= f.select :company_id, Company.all.collect {|m| [m.companyname, m.id]} %> In the show view for the person I can list the company name as follows: <%=h @person.company.companyname %> What I am trying to work out, is how do I make that a link to the company record? I have tried: <%= link_to @person.company.companyname %> but that just outputs the company name inside a href tag but links to the current page. Thanks, Danny

    Read the article

  • deriving activity diagram-based GUIs and CRUD them with a DB?

    - by Xin Tanaka
    i received a big book full of processes. i was thinking about the end user (they will be lawyers) and decided the best GUI would be showing activity diagrams or business processes. It reminded me Quickbooks and how non-accountants can successfully use it and understand accounting processes. i began doing research before sending my project to a bunch of programmers: is there some open source solution? can i use MS Visio libraries? which UML tool is programable? what about Eclipse and its modeling tools? etc etc the key points here are: relationships between events, artifacts, actors, etc should be stored in a database. processes or steps in a process should be easily modified by updating the database do this sounds too crazy? (should I explain a bit more why it must be programmed this way?)

    Read the article

  • How to access GMAIL for storage in custom CRM SQL Server DB?

    - by Optimal Solutions
    I have a client who wants his custom-written CRM to be able to access his sales people's emails so that, effectively, a history of email conversations between customer and salesperson is stored inside the CRM's database. The CRM is written in VB 2008 and the database is SQL Server 2008. The only email these people use, in the shop and on the road, is GMAIL. Each sales person has their own GMAIL address. Thats how they operate. If they're on the road and respond to a customer's email inquiry about a product, they would like that email conversation to be stored in a table in the database. I think thats the part I cant wrap my head around. How to get access to the email data (knowing the user id and password) and doing so from VB 2008

    Read the article

  • Why doesn't this piece of php code work?

    - by Sam Gabriel
    Hey guys, I have a mysql database which stores an id for each picture, as well as the picture's url and its thumbnail url. the thumbnail url is something like thumbs/pic.jpg and the page I'm creating has the folder thumbs in the same place it is created. But when I run this piece of code, nothing shows up: <?php ini_set('display_errors', 'On'); error_reporting(E_ALL | E_STRICT); mysql_connect("localhost", "***", "***") or die(mysql_error()); mysql_select_db("pics") or die(mysql_error()); $results = mysql_query("select id from classpics") or die(mysql_error()); $data=mysql_fetch_array($results); foreach($data as $uno) { echo '<td valign="middle" align="center"><a class="neutral" href="../images.php?id=' . $uno['id'] . '"><img src="'. $uno['thumbs'].'" border="0" /></a></td>'; } ?>

    Read the article

  • Letting users trial your web app before sign-up: sessions or temp db?

    - by Mat
    I've seen a few instances now where web applications are letting try them out without you having to sign-up (though to save you need to of course). example: trial at http://minutedock.com/ I'm wondering about doing this for my own web app and the fundamental question is whether to store their info into sessions or into a temp user table? The temp user table would allow logging and potentially be less of a hit on the server correct? Is there a best practice here?

    Read the article

  • database vs flat file, which is a faster structure for "regex" matching with many simultaneous reque

    - by Jamex
    Hi, which structure returns faster result and/or less taxing on the host server, flat file or database (mysql)? Assume many users (100 users) are simultaneously query the file/db. Searches involve pattern matching against a static file/db. File has 50,000 unique lines (same data type). There could be many matches. There is no writing to the file/db, just read. Is it possible to have a duplicate the file/db and write a logic switch to use the backup file/db if the main file is in use? Which language is best for the type of structure? Perl for flat and PHP for db? Addition info: If I want to find all the cities have the pattern "cis" in their names. Which is better/faster, using regex or string functions? Please recommend a strategy TIA

    Read the article

  • database vs flat file, which is a faster structure for regex matching with many simultaneous request

    - by Jamex
    Hi, which structure returns faster result and/or less taxing on the host server, flat file or database (mysql)? Assume many users (100 users) are simultaneously query the file/db. Searches involve pattern matching using regex against a static file/db. File has 50,000 unique lines (same data type). There could be many matches. There is no writing to the file/db, just read. Is it possible to have a duplicate the file/db and write a logic switch to use the backup file/db if the main file is in use? Which language is best for the type of structure? Perl for flat and PHP for db? TIA

    Read the article

  • asp.net membership db. Adding branches to a user

    - by diver-d
    Hi everyone, I am playing around with the membership database and have a question. Lets say I have a company called company ABC. There are 10 branches that belong to comapany ABC. IS there anyway to create a relationship within the database using company ABC as the parent and having the 10 branches as childs? I hope that makes sense :)

    Read the article

  • Sanitize HTML before storing in the DB or before rendering? (AntiXSS library in ASP.NET)

    - by user102533
    I have an editor that lets users add HTML that is stored in the database and rendered on a web page. Since this is untrusted input, I plan to use Microsoft.Security.Application.AntiXsSS.GetSafeHtmlFragment to sanitize the HTML. Should I santiize before saving to the database or before rendering the untrusted input into the webpage? Is there an advantage in including the AntiXSS source code in my project instead of just the DLL? (Maybe I can customize the white list?) Which class file should I look in for actual implementation of the GetSafeHtmlFragment

    Read the article

  • Why can't I insert record with foreign key in a single server request?

    - by Eran Betzalel
    I'm tryring to do a simple insert with foreign key, but it seems that I need to use db.SaveChanges() for every record insert. How can I manage to use only one db.SaveChanges() at the end of this program? var files = new List<File> { new File { Name = "Test1" }, new File { Name = "Test2" }, new File { Name = "Test3" } }; foreach (var file in files) { db.AddToFileSet(file); db.SaveChanges(); db.AddToDirectorySet( new Directory { DirectoryName = file.Name + "Dir", CreationDate = DateTime.UtcNow, file_relation = file }); db.SaveChanges(); }

    Read the article

  • problem in counting two fields in one query

    - by Mac Taylor
    hey guys i need to count new private messages and old one from a table so first thing come to mind is using mysql_num_rows and easy thing to do // check new pms $user_id = $userinfo['user_id']; $sql = "SELECT author_id FROM bb3privmsgs_to WHERE user_id='$user_id' AND (pm_new='1' OR pm_unread='1')"; $result = $db->sql_query($sql) ; $new_pms = $db->sql_numrows($result); $db->sql_freeresult($result); // check old pms $sql = "SELECT author_id FROM bb3privmsgs_to WHERE user_id='$user_id' AND (pm_new='0' OR pm_unread='0')"; $result = $db->sql_query($sql) ; $old_pms = $db->sql_numrows($result); $db->sql_freeresult($result); but how can i count these two fields just in one statement and shorter lines ?~

    Read the article

  • Is DB logging more secure than file logging for my PHP web app?

    - by iama
    I would like to log errors/informational and warning messages from within my web application to a log. I was initially thinking of logging all of these onto a text file. However, my PHP web app will need write access to the log files and the folder housing this log file may also need write access if log file rotation is desired which my web app currently does not have. The alternative is for me to log the messages to the MySQL database since my web app is already using the MySQL database for all its data storage needs. However, this got me thinking that going with the MySQL option is much better than the file option since I already have a configuration file with the database access information protected using file system permissions. If I now go with the log file option I need to tinker the file and folder access permissions and this will only make my application less secure and defeats the whole purpose of logging. Is this correct? I am using XAMPP for development and am a newbie to LAMP. Please let me know your recommendations for logging. Thanks.

    Read the article

  • Is there any framework for Windows Forms, DB driven application development/prototyping?

    - by dolzenko
    I'm writing simple database driven application, 80% of functionality is CRUD operations on about 15 tables. Coming from web development background I figured I can cover almost all of these CRUD cases with Rails scaffolding or say Django admins. So I started to look around for Rails/Django-like framework but for Windows Forms applications (ofcourse I understand that "rich client" application development significantly differs from a web development and I'm not expecting anything really similar). I was surprised that except for a variety of ORMs (let's call it Model-layer) it seems like I'm left with little choice when it comes to View-Controller layer. Maybe I'm missing something? PS. I evaluated Visual Studio DataSet Designer, but it seems to work only for the most simple cases, and requires additional code for any slightly nontrivial task. (added) so far I've found: TrueView for .NET (thanks to Vijay Patel) NConstruct

    Read the article

  • Need a good way to store data in a DB from a table on a webpage that can have N columns.

    - by Abe Miessler
    Users need to be able to add a specific type of column to an otherwise static table on my web page and then save the information they enter in there to the database. I've been told that in reality they will almost never go over 5 columns but I would rather support N. The columns will all be of the same datatype. My first thought was to have an XML column with the values from all added columns in there but I was curious if anyone else had come up with a better solution. Suggestions?

    Read the article

  • Writing a custom auth system (like the default django auth system), use it to generate tables in DB

    - by dotty
    Hay all, I've been reading up on middleware and how to use it with a context object. I want to write a simple middleware class which i can use on my own applications, it will essentially be a cut down version of the django one. The problem i seem to have is that if i have INSTALLED_APPS = ('django.contrib.my_auth') in the settings file, all is well. I've also added MIDDLEWARE_CLASSES = ('django.contrib.my_auth.middleware.MyAuthMiddleware') in it and everything is fine. My question is, how would i make my middleware automatically generate tables from a models.py module, much like how the django auth does when i run manage.py syncdb? thanks

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >