1. SQL Wildcards in ASP.NET applications

    Date: 02/08/07 (Asp Dot Net)    Keywords: database, asp, sql

    Ok, I'm pretty much at a loss here. I've got a database (SQL Server 2000) that I'm trying to connect to using an xsd DataSet using VS 2005. I've built it and it works for everything I've been trying to do so far in this application, and several others, until now. What I'm trying to do is do a very simple search inside one of the fields, so that my users can find all the names of the people whose names begin with a certain letter. The commandText I created for the method is simple:

    SELECT     dbo.Personal.*
    FROM         dbo.Personal
    WHERE LastName LIKE @SearchText


    Pretty simple, I thought. The code I use to bind the results to a data grid is:

    gvListing.DataSource = tblPersonal.GetDataByLastName(txtSearchText.Text & "%")

    Now, the "interesting" things begin. When I search for a user's last name using only the first letter, I don't get any rows returns. However, if I do a search for something like "S%%%", it will return all the names in the database that have 5 characters in them.

    I was under the impression that the % was the zero or more wildcard for SQL Server databases, but this is making me thing that ASP.NET is translating it as a single character wildcard. I've also tried using * instead of %, but it never returns a result, same with ?. I'm at a loss here, so any insight on how to get this simple search to work would be wonderful/

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

  2. mySQL, BLOBs and image streams

    Date: 02/09/07 (PHP Community)    Keywords: browser, html, database, java

    I was wondering if anyone had thought of a useful way to get images out of BLOB fields in a database table and send them to a rendered HTML page inline. This whole calling another script via a URI that fetches the picture as a served "page" via a second request seems very redundant.

    I've seen the client side encoded binary tricks through javascript, and they are clever but rely on the client's browser settings too much to be comfortable. The fact that IE refuses to implement the data: URI is a pain in the royal parts. An idea I had was to save the results as temp files and serve them that way, but again, terribly redundant - not to mention hard on the server.

    So have any bright sparks come up an elegant and W3C friendly way to pull an image binary from a BLOB and include it in an tag?

    (I'm aware of the database overhead with many BLOBs - this is just an exercise in extreme cleverness)

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

  3. Negative Captcha advice

    Date: 02/12/07 (PHP Community)    Keywords: database

    An in house client needs to protect a database of +30,000 individuals, but at the same time provide all of their personnel information. First thing added was a user login/register gateway but I've only been allocated another 2 work hours on this project before I have to deploy it.... so has anyone out there messed with anti-harvesting scripts? The server in question is owned by my company and we have the capability of banning IP's on demand, so I just need to come up with some sort of glue code between the banning mechanism and the bots.

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

  4. Kos moves to Ruby on Rails

    Date: 02/15/07 (Open Source)    Keywords: database, web

    The choice of Ruby on Rails is an interesting one. While Scoop, which Dailykos now runs on, is optimized for use as a Community Network Service, Ruby on Rails is a Web framework that needs a database and Web server to become active.

    Source: http://feeds.feedburner.com/~r/zdnet/open-source/~3/91196548/

  5. credit card information

    Date: 02/15/07 (PHP Community)    Keywords: database

    I need to capture credit card information to store in a database for processing later on, in-house. What do you recommend as the best way?

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

  6. Job Posting: Lead PHP developer position

    Date: 02/17/07 (PHP Community)    Keywords: php, mysql, browser, css, html, database, sql, web, linux, apache

    Schedge, an Austin based company, is reinventing scheduling.

    We are looking for an experienced Lead PHP developer.

    Have you developed enterprise scale PHP applications?
    Have you worked with technologies like AJAX and MVC?

    Then this might be the position for you!

    You'll be responsible for leading the development efforts of the core application. The position is contract-to-hire with the option of equity in the company.

    Key Areas of Responsibility:
    * PHP Application and database development
    * Work with Designers and other Developers to build complex user interfaces and data interactions
    * Write/Update functional specs

    Required Experience:
    * Enterprise scale PHP experience
    * MVC (Model-view-controller) design experience
    * Basic DOM Scripting experience
    * Basic (X)HTML & CSS experience
    * MySQL
    * Multi-browser development
    * Apache Webserver

    Preferred additional experience:
    * Experience with the CakePHP (or similar) PHP framework
    * Flash or Action Scripting experience
    * MySQL clustering
    * Code development for Linux servers

    You'll be a good fit if:
    * You “get the Web”, and understand it’s full potential.
    * Work efficiently and get it right, not just "good enough"
    * Can set and execute priorities individually and in a group
    * Effectively communicate to people of varying levels of technical expertise

    Please note: Telecommuting is possible for this position but the ideal candidate will be located in Austin, TX and available for weekly meetings.

    If you feel you are a good fit for this position please send your resume and rate per hour to jobs@schedge.com

    [Cross-Posted to several list] My apologies if you see it multiple times.

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

  7. Job Posting: Lead PHP developer position

    Date: 02/17/07 (Web Development)    Keywords: php, mysql, browser, css, html, database, sql, web, linux, apache

    Schedge, an Austin based company, is reinventing scheduling.

    We are looking for an experienced Lead PHP developer.

    Have you developed enterprise scale PHP applications?
    Have you worked with technologies like AJAX and MVC?

    Then this might be the position for you!

    You'll be responsible for leading the development efforts of the core application. The position is contract-to-hire with the option of equity in the company.

    Key Areas of Responsibility:
    * PHP Application and database development
    * Work with Designers and other Developers to build complex user interfaces and data interactions
    * Write/Update functional specs

    Required Experience:
    * Enterprise scale PHP experience
    * MVC (Model-view-controller) design experience
    * Basic DOM Scripting experience
    * Basic (X)HTML & CSS experience
    * MySQL
    * Multi-browser development
    * Apache Webserver

    Preferred additional experience:
    * Experience with the CakePHP (or similar) PHP framework
    * Flash or Action Scripting experience
    * MySQL clustering
    * Code development for Linux servers

    You'll be a good fit if:
    * You “get the Web”, and understand it’s full potential.
    * Work efficiently and get it right, not just "good enough"
    * Can set and execute priorities individually and in a group
    * Effectively communicate to people of varying levels of technical expertise

    Please note: Telecommuting is possible for this position but the ideal candidate will be located in Austin, TX and available for weekly meetings.

    If you feel you are a good fit for this position please send your resume and rate per hour to jobs@schedge.com

    [Cross-Posted to several list] My apologies if you see it multiple times.

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

  8. Job Posting: Lead PHP developer position

    Date: 02/17/07 (PHP Development)    Keywords: php, mysql, browser, css, html, database, sql, web, linux, apache

    Schedge, an Austin based company, is reinventing scheduling.

    We are looking for an experienced Lead PHP developer.

    Have you developed enterprise scale PHP applications?
    Have you worked with technologies like AJAX and MVC?

    Then this might be the position for you!

    You'll be responsible for leading the development efforts of the core application. The position is contract-to-hire with the option of equity in the company.

    Key Areas of Responsibility:
    * PHP Application and database development
    * Work with Designers and other Developers to build complex user interfaces and data interactions
    * Write/Update functional specs

    Required Experience:
    * Enterprise scale PHP experience
    * MVC (Model-view-controller) design experience
    * Basic DOM Scripting experience
    * Basic (X)HTML & CSS experience
    * MySQL
    * Multi-browser development
    * Apache Webserver

    Preferred additional experience:
    * Experience with the CakePHP (or similar) PHP framework
    * Flash or Action Scripting experience
    * MySQL clustering
    * Code development for Linux servers

    You'll be a good fit if:
    * You “get the Web”, and understand it’s full potential.
    * Work efficiently and get it right, not just "good enough"
    * Can set and execute priorities individually and in a group
    * Effectively communicate to people of varying levels of technical expertise

    Please note: Telecommuting is possible for this position but the ideal candidate will be located in Austin, TX and available for weekly meetings.

    If you feel you are a good fit for this position please send your resume and rate per hour to jobs@schedge.com

    [Cross-Posted to several list] My apologies if you see it multiple times.

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

  9. string length

    Date: 02/20/07 (PHP Community)    Keywords: database

    yes i am back again, but this is a quick one, due to brain shutdown.

    I'm pulling article titles from the database to display on the index page with a "read more" link, but each article also has a "short description" to go with it. 'd like to display this short description, but limit how long it is. So that if it is longer than, say, 40 chars, to cut it off and add three dots (...) before displaying the 'read more' link.

    So, i know i can use $descLength = strlen($artDesc'] to find out how long it is. Then the start of the if would be if($descLength > 40), but it's the bit in the middle i'm stuck on .

    $descLength = strlen($artDesc'];

    if($descLength > 40) {

    $newDesc = 40 char long version of $descLength;
    $newDesc .= "...";

    }

    i just need that bit in the middle. Is it something like rtrim()?

    many thanks in advance!

    paul.

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

  10. Hosting and Domain

    Date: 02/21/07 (IT Professionals)    Keywords: mysql, database, sql, postgresql, web, hosting

    I used to work in web hosting and domain registration and the like. But I've been out of it for the last 2 and half years focusing on backup and disaster recovery. Anyway, does anyone know of a "good" hosting and domain registration service? I know from experience that a lot of these companies will milk you for every dollar they can and you need to have a company that is on the up and up. Has anyone had good experience with a particular company?
    The site will be a small specialty site. No commerce or what have you, but we will need email, and about 10 MB of space. This will be a business but should not have a lot of traffic. 10 hits per day average. If possibly, I would like to have the ability to do database (MySQL or PostgreSQL) and shell access but that is not a requirement.

    Thank you in advance for any help.

    Source: http://community.livejournal.com/itprofessionals/52421.html

  11. blog with tags.

    Date: 02/26/07 (PHP Community)    Keywords: database

    As per my previous post I’m making a very simple blog. I'd like to include tags as a feature.
    I'm having trouble understanding the logic behind...

    The way I see it I'll need 2 or more tables in my database. One to handle the posts and one to handle the tags. In the post table I’d have an ID, subject, body, time, who posted it. For the tags table I’d have an ID, and tag field. Am I correct so far?
    I lose it at this point because now, what if someone tags with 'My Vacation to Mexico' and not Vacation, Mexico, Fun. The tag field in my tags table will be unable to sort by Mexico in the first example, or I'll get a bunch of crap data and be able to sort by the word My.

    Thoughts Ideas?


    Thanks.

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

  12. Where Can I Find an Out-of-the-Box Rich Text Editor?

    Date: 02/26/07 (Web Development)    Keywords: blogging, software, database, web

    Hey guys,

    I'm trying to put together a project in which users will be able to interface with a rich text input editor, kind of like what you see when you click the "rich text" tab on the Update page of Livejournal; that would allow a user to insert images, create link anchors, etc.

    More generally, though, I'm trying to figure out in this project a way to let some users of my website to be able to create new pages and modify them using this rich text interface. You may ask, why not use a blogging tool? The reason I'm not using Wordpress or other blog software is unfortunately I cannot use a database in this project (don't ask), and those tools practically demand one. I can use a folder and file structure. So now you know the outlines of my challenge.

    What do you think are the odds of creating a system like this without a database? I initially figured it would be a piece of cake until I stopped to think of how and where the data would be stored, etc.

    Moreover, do you know any out of the box apps to use in this project?

    I know a few people here contributed to Wordpress and other open source projects like Geeklog. I'd appreciate your input.

    Thank you!

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

  13. asp.net/sql help?

    Date: 03/02/07 (IT Professionals)    Keywords: database, asp, sql, web, google

    Hi! I'm currently making a website for a school project using ASP.NET and SQL and it has a registration form. How do I keep the registered entries unique like say...make sure no two people get the same login name? My 'loginname' variable in my database is data type nvarchar(50). I've tried google and some other sites but I don't think I'm getting the keywords correctly.

    Thanks for your time!

    Source: http://community.livejournal.com/itprofessionals/53657.html

  14. using an iPod shuffle without iTunes

    Date: 03/02/07 (Computer Geeks)    Keywords: database, google

    I just thought I'd post this for anyone who might be interested.

    I got an orange shuffle for Valentine's Day, and I immediately started looking for alternatives to iTunes. I hate iTunes, especially for something as simple as a shuffle. I found a program called iShuffle that lets you organize your music on your shuffle how YOU want to and then rebuild the iPod database so it thinks you used iTunes.

    Last night, I wrote a batch script that lets me right click on a Winamp playlist (m3u file) in My Computer/Windows Explorer and send the contents of the playlist to the shuffle. It's a little slow because it just uses the COPY command, so it takes a few minutes to transfer 850MB of music.

    There is also a setup file to make it easy for you to use it on your own computer, along with instructions and a separate file that lets you change the iPod's drive letter in the batch file if you've already run the setup before.

    I tested this on my own shuffle, and it worked beautifully.

    So, if you're interested, give it a shot. If you decide you don't like it, you can just use the "Restore" feature in iTunes to erase your iPod and go back to using iTunes.

    Get it here:
    http://shifuimam.googlepages.com/home

    It's my first real experience with writing batch files, so it might be a little ineffecient - suggestions are welcomed!

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

  15. stars

    Date: 03/03/07 (PHP Community)    Keywords: php, database

    I'm trying to edit this star rating system...
    http://www.masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/

    I've got it working as it should, it wasn't that hard. Now I want to edit it to mesh into my site.

    This is what actually makes the stars show up on the page.. rating_bar('1',5);
    The 1 is the row on the database and the 5 is how many stars you want, easy enough.

    However, I want the 1 to change ... rating_bar('$x',5); Doesn't work.

    I'd like http://www.site.com/gallery.php?id=30 to do rating_bar('30',5);


    Help! Thanks.

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

  16. Quick question.

    Date: 03/04/07 (PHP Community)    Keywords: php, mysql, html, database, asp, sql, web, yahoo

    Okay, I'm still getting the grasp of php... I went off for a while to actually learn html... Okay, well. I'm having the most troubles with mysql. It's quite confusing, along with cookies. Anyways, this isn't going to be about cookies. I want to just know how I can somehow get a nice list of... everything. Somehow. I really want know what's IN my mysql database and what names, etc. I'm using a pre-made script, so I'm rummaging around in circles with no straight answers on what what is.

    Anyways, I'm going to go to sleep, tomorrow I'll check back for answers for this... I'd like to know if I need to make a page or something like... www.website.com/mysqltestpage.php and go there.


    Eh. Anyways, I need a lot of advise, if someone has msn/yahoo/aim/irc/skype/etc. uhhh tell me if you'd let me add you and ask questions from time to time.

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

  17. pHp newbie

    Date: 03/07/07 (PHP Community)    Keywords: php, mysql, css, html, database, sql, web, microsoft

    I have to make an online volunteer hour logger for a school project, so I've been teaching myself PHP for the past few days, but for some reason none of the scripts I've tried have worked for me. I have a domain and server that provide MySQL and a web-based database manager (CPanel) and know HTML and CSS pretty well.

    Basically what I want my website to be able to do is:

    1. Enable users to register (fields: name, student no., password, password verification, email)
    2. Login and submit their volunteering information in a form (fields: organization name, event/activity, volunteer type (drop down), date, #hours, reference letter (check box))
    3. Be able to edit this information after submission
    4. Logout
    5. Possibly the administration being able to access a report summarizing a certain user's information? (like a query on Microsoft Access)

    I've been following: http://www.tutorialized.com/tutorial/Signup-and-Login/3027 but after doing everything I don't know how to connect users to members-only pages.

    My website right now is: http://www.rhscolts.org/cas
    Login will be registration and login, and Your Hours will have a "Please login or register" message unless the person is already logged in, in which case the form and their volunteering info will appear.

    Is this too hard to do? Because I asked some people before I set about doing this project and they told me all I need is a few scripts, but then nothing is really working right now :(

    Can anyone help me please?
    My email is sheatore@hotmail.com if you want to talk to me directly.
    Please and thank you in advance, ANYONE!

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

  18. Pagination

    Date: 03/07/07 (PHP Community)    Keywords: database

    Hi

    I am working with a database where when users search they are only given the first 500 records (or however many fit their search criteria should it be less than 500). I want to have pagination set up so that there are 50 records per page. I used the tutorial found here however when I go from page to page using the "Next" or "Previous" links (or any of the other ones) it searches without the WHERE clause - the select statement being used reverts to "SELECT * FROM tablename LIMIT 0,50". You can see it in action at http://www.a5data.com/demo/ .

    I of course want it to remain "SELECT * FROM tablename WHERE [whereclause info]" with the pagination as well as the 500 records limit. Is this possible? If so, how would I go about doing it?

    Any help to solve this would be greatly appreciated as I'm banging my head against the wall trying to get this fixed.

    Thanks!

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

  19. MySQL Functions Flat-Out Lying to Me

    Date: 03/11/07 (PHP Community)    Keywords: php, mysql, database, sql

    Hi, folks. I've been pulling my hair out over this one. I have a class that's supposed to serve as a base class for a variety of others; it's a sort of PHP version of Rails' ActiveRecord. Object properties map to columns in an associated database table. One of the columns is hide, a column that holds either 0 or 1. If a given row has a 1 in its hide column, the framework I'm building should omit the item from display.

    So, I have an is_hidden() function that returns the object's status (as a Boolean), and the method that's giving me fits is toggle_hidden(), which takes an optional argument: basically, you can "toggle the hidden-state on", toggle it off, or "just toggle it", meaning flip it from whichever state it's in to the other one.

    So that method looks like this:

    function toggle_hidden($state = 'toggle') {
         global $DBH;
         if (is_string($state)) {
              $state = strtolower($state);
         }
         # Add some syntactic sugar to make life sweet...
         if ($state == 'off' || $state == 'false' || $state == 'no' || $state == false) {
              $state = 0;
         } elseif ($state != 'toggle') {
              $state = 1;
         } else {
                   $state = (int) $this->is_hidden();
                   $state = 1 - $state;
         }
         $sql = "UPDATE $this->_db_table SET hide = '$state' WHERE id = '$this->id'";
         $dbq = mysql_query($sql);
         if (! $dbq) {
              $this->_errormsg = "Unable to set 'hide' state of $this->_objname #this->id to $state; SQL error: " . mysql_error();
              return false;
         }
         return true;
    }


    ($DBH is a global database handle that's already been set up; the object properties $id, $_db_table, $_objname and $_errormsg all do exactly what it seems like they should. They're not the problem.)

    If I call toggle_hidden(1) or toggle_hidden(0), I can force an object's state to hidden or visible, no problem. But if I call the method with no argument, it claims it's doing the right thing... but nothing changes.

    Even worse, I wrote up this version with loads of print statements for debugging:

    function toggle_hidden($state = 'toggle') {
         global $DBH;
         print "INITIAL CALL: toggle_hidden($state)
    \n";
         if (is_string($state)) {
              $state = strtolower($state);
         }
         if ($state == 'off' || $state == 'false' || $state == 'no' || $state == false) {
              $state = 0;
              print "I'm forcing \$hide to $state
    \n";
         } elseif ($state != 'toggle') {
              $state = 1;
              print "forcing \$hide to $state
    \n";
         } else {
                   $state = (int) $this->is_hidden();
                   print "state was originally $state; ";
                   $state = 1 - $state;
                   print "converting to $state
    \n";
         }
         $sql = "UPDATE $this->_db_table SET hide = '$state' WHERE id = '$this->id'";
         print "SQL Query: $sql
    \n";
         $dbq = mysql_query($sql);
         if (! $dbq) {
              $this->_errormsg = "Unable to set 'hide' state of $this->_objname #this->id to $state; SQL error: " . mysql_error();
              return false;
         }
         print "affected " . mysql_affected_rows() . " rows
    \n";
         $sql = "SELECT id, hide FROM $this->_db_table";
         # Tell me what *really* happened...
         print "
    \n$sql:
    \n";
         $dbq = mysql_query($sql);
         while (list($id, $hide) = mysql_fetch_row($dbq)) {
              print "     $id [hide] = $hide
    \n";
         }
         print "
    \nreturning true
    \n";
         return true;
    }


    When I run it, it not only claims it's doing what it should; it then runs the "tell me what *really* happened" section and claims that the database now has the new values.

    Except that it doesn't. So that final "SELECT id, hide FROM $this->_db_table" call is effectively returning invalid data?

    Here's sample output from a run of this method.

    Loaded object Practitioner id #2; hide is '1'
    INITIAL CALL: toggle_hidden(toggle)
    state was originally 1; converting to 0
    SQL Query: UPDATE practitioners SET hide = '0' WHERE id = '2'
    affected 1 rows

    SELECT id, hide FROM practitioners:
         1 [hide] = 1
         2 [hide] = 0

    returning true


    Despite what the last few lines of output claim, the database has not changed; I can query the database with any other tool (including other pages from this very same framework!) and see that both rows still have 1 in their hide column.

    Does anyone here have any clue what's going on, and how I can get my database queries to stop lying to me? (It seems almost like I need to commit the change, but I'm not using transactions...)

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

  20. LTE script?

    Date: 03/12/07 (Computer Geeks)    Keywords: php, database

    does anybody know of a good 'letter to the editor' script or have any ideas?

    i'm helping a political advocacy group who'd like to help people email local newspapers and/or congress people with letters, etc

    i found local ink:
    https://sourceforge.net/projects/localink/

    and i have everything set up but i have no idea how to add newspaper/zip code information into the database correctly. i tried with phpMyAdmin adding it in manually and that didn't work either.

    any ideas? would appreciate any help in the right direction with somebody who's done something like this before, either with local ink or something else.

    thanks so much!

    Source: http://community.livejournal.com/computergeeks/1049524.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