1. Database margin compression, helped by open source

    Date: 07/20/06 (Open Source)    Keywords: database

    For a long time Oracle could claim that there were no open source alternatives for enterprise database applications, but that is no longer the case.

    Source: http://blogs.zdnet.com/open-source/?p=717

  2. error in PHP & MySQL in a loop

    Date: 07/21/06 (PHP Community)    Keywords: php, mysql, html, database, sql

    The following has been providing a bit of a problem for me over the past few days. I have an initial display page with the HTML form and text fields, however the number of text fields can be controlled by the user. As such they are all placed into an array within the $_POST array, to be retrieved later. I've tried doing this, and this alone works fine. The problem is when I try to loop through them to insert them into the database, for some reason while they will display through echo fine, only the first one will insert into the database, then throw an error. Below is a loose sample of the code.

    The text fields in the HTML file are named as follows : $name[]

    The code in the PHP file is as follows, excluding anything not necessary for the example :




    $conn = db_connect(); // establishes a database connection
    if (!conn)
    {
    echo "database error";
    exit;
    }

    $i = 0;

    while(isset($_POST['name'][$i])){

    $name[] = $_POST['name'][$i];

    $i++;
    }

    $i = 0;

    foreach($name as $name_current){

    echo $name[$i];

    echo $name_current;

    $query = mysql_query("insert into names values ('$other_variable','$other_variable2', '$name_current', '', '', '')");

    $i++;

    if(!$query){
    echo "Database Error";
    exit;
    }else{
    echo "Name added successfully!";
    }
    }



    if anyone can spot something I'm overlooking please let me know, I'm still at a loss for why it will only insert into the query on the first pass through the loop, however if I'm just echoing the values it will work fine.

    Thanks,
    Exeyel

    Source: http://community.livejournal.com/php/472928.html

  3. You're never going to believe what's kicking my butt this time...

    Date: 07/21/06 (PHP Community)    Keywords: php, database, java, google

    Hello, My favorite PHPers! I come to you once again with one of the easiest things I could ever imagine you've been asked, but it just...doesn't...like...me.

    And really, I should have figured this out ages ago.

    All I need to do is verify whether a checkbox has been checked.

    I've googled it, but unfortunately everything that's popped up has been for JavaScript. Which isn't used in this project.

    The status of the checkbox (either checked or unchecked) is going into a database (They're boolean fields that just get set to 0 or 1 it looks like) for use in another part of this app that I, hopefully, won't have to write (like that'll happen).

    So here's what my conditional statement looks like:

    if ($_POST['docAction1'] == checked)
      $query .= "'1', ";
    else
      $query .= "'0', ";


    Unfortunately, where it says 'checked', I don't know what is supposed to go there. I've tried many things, like "true", "on", "checked", "1", etc etc etc. But nothing gets updated in the database. So, I come to you, humbled by the simple stuff.

    Please be kind.

    p.s. The checkbox names (docAction1) will be changed at a later date to better reflect the text that will be associated with the checkbox. Right now they're just labeled as "checkbox 1, 2, 3" etc. So hush you variable-name hounds!

    Source: http://community.livejournal.com/php/473486.html

  4. LOAD DATA INFILE and AUTO_INCREMENT

    Date: 07/25/06 (MySQL Communtiy)    Keywords: mysql, database, sql

    hi all

    I'm trying to import data into a table with a column that has AUTO_INCREMENT:

    MYSQL> desc stats;
    +-------+---------------------+------+-----+---------+----------------+
    | Field | Type                | Null | Key | Default | Extra          |
    +-------+---------------------+------+-----+---------+----------------+
    | id    | bigint(20) unsigned |      | PRI | NULL    | auto_increment |
    | date  | bigint(14) unsigned | YES  |     | NULL    |                |
    | ent1  | varchar(10)         |      |     |         |                |
    | ent2  | varchar(10)         |      |     |         |                |
    +-------+---------------------+------+-----+---------+----------------+
    
    LOAD DATA INFILE "stats.txt" INTO TABLE stats (date, ent1, ent2);
    Query OK, 140 rows affected (0.01 sec)
    Records: 140  Deleted: 0  Skipped: 0  Warnings: 0
    

    There are 140 lines in stats.txt, fields are terminated by a tab, lines are terminated by a new line. I get 140 new entries, but "id" column (auto_increment) is "0":
    +------+----------------+------------+------------+
    | id   | date           | prid       | did        |
    +------+----------------+------------+------------+
              
    | 3870 | 20060725133314 | FFFFFFFFFF | f111111111 |
    | 3871 | 20060725133613 | FCCCCCCCCC | f222222222 |
    | 3872 | 20060725133722 | FDDDDDDDDD | d333333333 |
    |  0   | 20060704011139 | FVVVVVVVVV | e111111111 |
    |  0   | 20060704104952 | LSSSSSSSSS | f222222222 |
              
    |  0   | 20060720161936 | FDDDDDDDDD | d111111111 |
    +------+----------------+------------+------------+
    


    So, that is the problem. I just wonder this is a very common question, but I am new in databases...
    Any of your help will be appreciated.

    Best,
    Leo

    Source: http://community.livejournal.com/mysql/100368.html

  5. WordPress PHP Coder?

    Date: 07/26/06 (Computer Geeks)    Keywords: database

    Anyone here skilled at hacking WordPress?

    I need to find someone who can re-code the signup page to a WordPress site to include the collection of additional data and then insert it into the database. I have installed the two plug-ins that extend the metadata and create new user fields. So it's just a case of re-coding the registration page with new fields and doing the inserts after the account is created. The goal is to have individuals who wish to enter a contest do it by signing up for a wordpress blog - the extra fields will be for the contest, and then they'll be both in the database as well as signed up for blog updates (as part of the contest).

    Anyone have the skills? If so, how long do you expect it would take, and what can I bribe you with?

    Source: http://community.livejournal.com/computergeeks/954652.html

  6. Open source compresses data warehouse margins

    Date: 07/26/06 (Open Source)    Keywords: database

    The knock on open source databases has always been that it doesn't scale. With this new offering, users can scale from a few megabytes to multiple terabytes, without changing the underlying database structure.

    Source: http://blogs.zdnet.com/open-source/?p=722

  7. objects, data sets, and html

    Date: 07/28/06 (PHP Community)    Keywords: html, database

    Say I have an object called ListStudents which queries a database for all known students. My first (procedural) impulse is to loop through the dataset and store each row in pre-formatted html rows. But something tells me there is a better way of handling it with OOP. Can someone help me?

    Source: http://community.livejournal.com/php/477035.html

  8. Web Developers: How easy is it to set up Drupal for a site?

    Date: 08/05/06 (WebDesign)    Keywords: cms, php, mysql, database, sql, web, hosting, shopping

    Sooo, I am 98% sure I'm taking on a client where I need to implement a CMS for him to make changes to the site if necessary. When I first wrote the quote a few months ago, I suggested Drupal as the CMS because it was free, looked rather customizable and somewhat easy to use. I have limited experience writing PHP and dealing with MySQL databases but understand the mechanics of it.

    This particular client is offering subscriptions to a database of business industry contacts. There will be about 500 contacts on the pay list (including name, office, affiliation, etc) and he will add to the list about every three months or so. What he will change on a regular monthly basis will be the articles he writes. The subscription concept then requires a shopping cart/check out system as well as a password/username management system for each user.

    Would Drupal be a good way to go for both my client and for me? Also, I'm switching web hosts and am considering becoming a reseller. Is there a web host that has it installed already? Door Host ( http://www.doorhost.net/ ) used to have it, but I don't think they do anymore. I'm considering going with Total Choice Hosting buying either their basic reseller plan or the regular Deluxe Plan.

    Nonetheless, who has used this or other comparable CMSs and which do you prefer and why?

    Drupal: http://www.drupal.org/

    Sites built with Drupal:
    http://www.terminus1525.ca
    http://urlgreyhot.com/personal/
    http://www.spreadfirefox.com/
    http://www.theonion.com/
    http://www.echoditto.com/

    Oh, I just found this Drupal web hosting company called Site Ground that has all of the major CMSs installed already and gives you 24,000 MB of space. Anyone heard of them? I also found these guys: Canaca.com.

    Source: http://community.livejournal.com/webdesign/1146967.html

  9. Organisations that change

    Date: 08/07/06 (MySQL Communtiy)    Keywords: database

    I'm developing a database of organisations with all the familiar field names that you would expect e.g., name of organisation, various address fields, office bearer fields etc.

    However I also want to have a "Year" field, so I can lookup information about the organisation in 2002, 2003, 2004, 2005 etc as the organisations I'm keeping track of have a high turnover of office bearers and, of course, occassionally address (and a couple have even changed their name).

    One method would be have a table for each year for each organisation, but that offends my sense of optimisation and normalisation.

    Any suggestions?

    Source: http://community.livejournal.com/mysql/101012.html

  10. Reuter’s Admits Doctoring (Photoshopped) Beirut Photographs, Fires Photographer Adnan Hajj

    Date: 08/07/06 (Java Web)    Keywords: database

    Reuters withdrew all 920 photographs by a freelance Lebanese photographer from its database on Monday after an urgent review of his work showed he had altered two images from the conflict between Israel and the armed group Hizbollah. Global Picture Editor Tom Szlukovenyi called the measure precautionary but said the fact that two of the images [...]

    Source: http://blog.taragana.com/index.php/archive/reuters-admits-doctoring-photoshopped-beirut-photographs-fires-photographer-adnan-hajj/

  11. Dealing with the CRM bear trap

    Date: 08/08/06 (Open Source)    Keywords: database

    Even after you go through this process, of course, you may still be in a trap if your database is proprietary, as it often is.

    Source: http://blogs.zdnet.com/open-source/?p=737

  12. JavaScript RegEx

    Date: 08/08/06 (Web Development)    Keywords: php, database, java

    So I've been relying primarily on PHP's preg_match for 100% of my form validation. Now I'm beginning to suspect it would be much cleaner to have JavaScript handle most of that (check for blank/empty inputs, or reject inappropriate characters/patterns) and simply leave the database checking for PHP (right or wrong login info, etc). Then I can have PHP handle all that stuff with AJAX-stuff, but not let bad input data even get out to the server in the first place. Of course, there's the local overhead a user will have to deal with, and slightly larger JavaScript file to load, but I could probably finagle it so it had all the regex script in a seperate file that it looks at when it needs it.

    What do you folks think?

    Source: http://community.livejournal.com/webdev/342757.html

  13. Hacking issue!

    Date: 08/11/06 (PHP Community)    Keywords: php, database, sql, security, web, hosting

    Sorry to be posting again with nothing to actually contribute, but I'm having a hacker issue with one of my websites. I'm not one to jump on sudden suspicions of hackers, and I don't victimize myself, but this is the second time someone's hacked my site.

    After the first time, I was extremely cautious. I uploaded my site to a new server and made sure not to install any interactive PHP scripts. I did, however, continue to code my website in basic PHP, but nothing that required a connection with an SQL database or any sort of log in - just simple PHP pages with dynamic inclusion and switch functions.

    [/END SOB STORY]

    My friend's webhost (my friend was hosting me at the time) sent this as a response to my e-mail:

    "Do NOT put any php pages back up on this site if you wish to host it with us and certainly not any phpbb boards which were most likely used in the attempt to hack our server."

    Considering I did not have a phpBB script uploaded, the only alternative is that he hacked my site through my actual php pages (at least according to her webhost).

    So my question is this: What are the security risks/vulnerabilities of just normal, non-interactive php pages?

    And if anyone can provide any security tips, that would be greatly appreciated!

    The good news is, I'm working on a simple gallery script that does not require an SQL connection or anything, so hopefully I'll be able to post that soon! :)

    EDIT Here's the code I've been using for the main page/subpages.


    include("language.php");



    EXXXOTiQUE » a ×××HOLiC site











    ";

    include("layout.php");

    echo "


    ";

    include("nav.php");

    echo "









    ";

    // --- DYNAMIC INCLUSION
    $page = basename($x);
    if(!$x)
    include("main.php");
    else
    include("$x.php");


    echo "







    ";
    ?>


    And for the sub-pages:



    Source: http://community.livejournal.com/php/481154.html

  14. Log On Script

    Date: 08/13/06 (Asp Dot Net)    Keywords: php, database, asp

    When I was working with PHP, My log on script pretty much just queried the database with a SELECT and matched user id and password with what was submitted by the user.

    How does this work in asp.net? Is there a better way?

    I'm lost... thanks.

    Source: http://community.livejournal.com/aspdotnet/73726.html

  15. minimum number of queries?

    Date: 08/13/06 (PHP Development)    Keywords: php, database

    Hello,

    I've got a bit of a problem that I'm not quite understanding.

    I'm working in PHP with an Oracle database. I need to have 12 queries in my program because I have 12 drop down menus representing each field in my Oracle table. For some reason, I cannot have more than 5 queries. Anymore than 5 and my drop down menus remain completely blank. I can't find any information about this...I can't even imagine why I can't have my 6th, 7th, etc. number of queries.

    Any idea why this is happening?

    Cheers,
    Mags

    Source: http://community.livejournal.com/php_dev/71944.html

  16. question again!

    Date: 08/14/06 (WebDesign)    Keywords: mysql, database, sql, web, google

    ok i've picked a new web host. i googled this but couldn't make it give me an answer. i would like to transfer emails that are stored on my current host's server to the new host and make them viewable thru the new host's webmail. is this kind of thing possible? would it depend on the web host and the email program they use?

    also i would like to transfer my message board as well. would it be as simple as downloading the mysql database and uploading it to the new server?

    thanks again for all your help!

    Source: http://community.livejournal.com/webdesign/1150308.html

  17. VBScript to VB

    Date: 08/14/06 (Web Development)    Keywords: database, web

    I currently have a VBScript that connects to a database, pulls out some information, does a compairson and then sends an email if conditions are met. It works online but I need to find a way to make this run on a schedule and I think the best way is probably to write it as a Visual Basic exe and set it up on the web server using the Windows scheduler.

    It's been about 5 years since I wrote a VB program so I was wondering if anyone out there could help me sort how to go about doing the same thing in VB as I did in VBScript? Or point me towards a tutorial that will let me connect to a database, run a query and send an email.

    Source: http://community.livejournal.com/webdev/344647.html

  18. simple databases

    Date: 08/15/06 (Web Development)    Keywords: database

    I need to create a simple database for a client's site where they can login and upload documents that will then be viewed online by their clients. The documents they'll be uploading are just simple excel spreadsheets and word docs.

    Is there an easy way I can create a simple database for them to do this, as I have no knowledge of database construction at all.

    Source: http://community.livejournal.com/webdev/345221.html

  19. A database without an operating system?

    Date: 08/15/06 (Open Source)    Keywords: database, linux

    The Ingres solution combines rPath Linux with the Ingres database, and is code-named Project Icebreaker.

    Source: http://blogs.zdnet.com/open-source/?p=745

  20. Move my databases for comics?

    Date: 08/17/06 (Web Development)    Keywords: oscommerce, database, web

    Hello all of you geniuses.

    I am currently trying to switch servers from an atrocious one to dreamhost, which I have heard good things about. I have my account set up and am in the process of moving files. Simple, right?

    Well, I am also moving an OScommerce store and a wordpress blog. I've managed to export my databases but that's where I'm stuck. Despite multiple wikis and support pages I just can't do this. I have run into brick wall after brick wall after brick wall, and I think it is just over my head. It is also somewhat of a time sensitive issue, as we run a few sites and a business off our web space and we've already been down/not updating for a week now. Even if i could figure out how to import these (I did manage to export them... I think...) I certainly wouldn't know how to test them to make sure they're working correctly before setting up the new DNSes and going live. Since I will hopefully never have to do this again, I'd like to just find someone to help me out with this and get it over with.

    Remember that business I was talking about? We run a comic book publishing company, and for your trouble of moving two databases for me, I will send you a big box of really awesome comics and graphic novels by some of the coolest artists and writers you've (n)ever heard of. You will also receive my ETERNAL GRATITUDE.

    Sound like a good deal?

    Drop me a line at coreymarie@gmail.com
    or AIM me at: well read robot

    I will relinquish passwords and you will help me and I will be happy and send you comics and the world will be a better place. Ideally I'd like to take care of this tonight or tomorrow.

    Source: http://community.livejournal.com/webdev/346446.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home