473,657 Members | 2,540 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting limited amount of data from text mysql-table

2 New Member
Hi!

I've searched the forum and the net for the answer of, probably an easy question for the experienced....

I need to limit the amount of text to 50 first characters when looping out the data from a mysql text-table. How and where do I attack this problem? :confused:

Thanks! :cool:
Aug 23 '06 #1
2 1854
ronverdonk
4,258 Recognized Expert Specialist
How about the MySql SUBSTRING() function. As in

Expand|Select|Wrap|Line Numbers
  1. SELECT id, SUBSTRING(comment,1,20) AS b FROM tbl_name 
See MySql documentation for specifics (www.mysql.com) , such as: http://dev.mysql.com/doc/refman/4.1/en/blob.html

Ronald :cool:
Aug 23 '06 #2
jenese
2 New Member
Thank you it worked and helped me! As I thought... not that hard ;)

cheers
Aug 23 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1803
by: Tetedeiench | last post by:
Hi ! I am currently changing the server for my website, and i make a heavy use of openssl functions. Both servers use PHP4.3.3 with OpenSSL 0.9.6i. I was actually testing with this code, taken out from PHP's documentation :
303
17593
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b. Yahoo store was originally written in Lisp. c. Emacs The issues with these will probably come up, so I might as well mention them myself (which will also make this a more balanced
0
2129
by: Stefan Tietke | last post by:
Hi all, for a realtime simulation of a video installation we want to use Quicktime to read video data from a file or stream and process the data in a realtime Gameblender model. We are trying to simulate a large-scale, low resolution media facade using individuell video pixels to control lamps mounted into the facade.
0
2219
by: Michael Schoen | last post by:
Hi there, i=B4m actually developing a performance criticial system where I need to index a huge amount of protocoll data. These data are already in a chronological order, so if I push the data one by one in the database I will never need an ORDER BY syntax, `cause mysql already stores the data the right way. That=B4s tweaking, isn=B4t it ;)
4
2695
by: Chefry | last post by:
I'm trying to set up an off the shelf script and keep getting an error. My host set up the mysql on my site and I changed the variables I had to in the settings.php file but I keep getting the following errors Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost' (Using password: NO) in f:\wwwroot\professionalchef\Back\JobsOnline\mysql.php on line 121 Warning: mysql_pconnect(): Access denied for user: 'ODBC@localhost'...
2
1148
by: wink martindale | last post by:
Hello all, I am building a vb.net app, using mysql and corelabs connector. I am having a bit of difficulty with a dbnull error. Here is some sample code: Do While myReader3.Read() txtFname.Text = myReader3("fname") txtLname.Text = myReader3("lname") txtMiddle.Text = myReader3("middle")
4
4491
by: R.Manikandan | last post by:
Hi In my code, one string variable is subjected to contain more amount of characters. If it cross certain limit, the string content in the varabile is automatically getting truncated and i am not getting the full data. Is there any max limit for an variable to store in javascript? Can anyone please help me to solve this prob?
1
5132
by: Newbie | last post by:
Hi All Wondered if you could help. I have created a little backup routine (using classic ASP and ADO) to get my data from my db into a bespoke XML file, ie I query the data into a recordset, concat the XML tags with this data and then put it into a text file using FileSysObj. This backup proc all works fine, but the problem is when I go to restore
3
5999
by: ist | last post by:
Hi, I am trying to get (and transfer over ASP.NET) some encrypted data from some MySQL fields. Since the data contains many unicode characters, I tried to get the data as a series of ASCII values, transfer those numeric values over ASP.NET. I had no problem doing this on my local computer, by getting the field with "cast(field as BINARY)" so that on ASP.NET I have a byte array.Then send every field of array over ASP.Net.
1
1783
by: gubbachchi | last post by:
Hi, For my project I have a "add" button, upon clicking it, it will take the user to next page where there will be a text box and list of data displayed below it which is fetched from mysql database. I have written the code for this which is working fine. But I have a problem, i.e. when user enters the code in text box and clicks "go" button a group of data will be fetched from the database and should be displayed below the text box, where...
0
8326
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5647
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2745
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1736
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.