Been playing with this for awhile SELECT CONCAT('http://images.amazon.com/images/P/'isbn'.01.TZZZZZZZ.jpg') FROM isbn_experiment LIMIT 10; Seems straightforward prepend and append the amazon url's for cover art to an isbn. Yet I only get the first part not isbn nor the end. Done several permutations but I ain't getting anywhere.
Erik Lewis wrote:
Been playing with this for awhile
SELECT CONCAT('http://images.amazon.com/images/P/'isbn'.01.TZZZZZZZ.jpg') FROM isbn_experiment LIMIT 10;
Seems straightforward prepend and append the amazon url's for cover art to an isbn. Yet I only get the first part not isbn nor the end. Done several permutations but I ain't getting anywhere.
You need some commas I think. CONCAT('string one','string two','string three') -- Greg Barniskis, Computer Systems Integrator South Central Library System (SCLS) Library Interchange Network (LINK) <gregb at scls.lib.wi.us>, (608) 266-6348
2009/11/5 Erik Lewis <elewis@ngrl.org>
Been playing with this for awhile
SELECT CONCAT('http://images.amazon.com/images/P/'isbn'.01.TZZZZZZZ.jpg')<http://images.amazon.com/images/P/%27isbn%27.01.TZZZZZZZ.jpg%27%29>FROM isbn_experiment LIMIT 10;
I think you may need som commas in the parentheses: SELECT CONCAT('http://images.amazon.com/images/P/', isbn, '.01.TZZZZZZZ.jpg')<http://images.amazon.com/images/P/%27isbn%27.01.TZZZZZZZ.jpg%27%29>FROM isbn_experiment LIMIT 10; http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat...) Regards, Magnus Enger libriotech.no
Actually tried it with the commas, same effect. On Nov 5, 2009, at 2:57 PM, Magnus Enger wrote:
2009/11/5 Erik Lewis <elewis@ngrl.org> Been playing with this for awhile
SELECT CONCAT('http://images.amazon.com/images/P/'isbn'.01.TZZZZZZZ.jpg') FROM isbn_experiment LIMIT 10;
I think you may need som commas in the parentheses:
SELECT CONCAT('http://images.amazon.com/images/P/', isbn, '. 01.TZZZZZZZ.jpg') FROM isbn_experiment LIMIT 10;
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat ;-)
Regards, Magnus Enger libriotech.no
Erik Lewis wrote:
Actually tried it with the commas, same effect.
I'd think isbn was a string, but if it's numeric you might need to 'string one', CAST(isbn AS CHAR), 'string three' -- Greg Barniskis, Computer Systems Integrator South Central Library System (SCLS) Library Interchange Network (LINK) <gregb at scls.lib.wi.us>, (608) 266-6348
It's VARCHAR, unfortunately that didn't work, but thanks for clueing me into what I see as a very useful function. On Nov 5, 2009, at 3:06 PM, Greg Barniskis wrote:
Erik Lewis wrote:
Actually tried it with the commas, same effect.
I'd think isbn was a string, but if it's numeric you might need to
'string one', CAST(isbn AS CHAR), 'string three'
-- Greg Barniskis, Computer Systems Integrator South Central Library System (SCLS) Library Interchange Network (LINK) <gregb at scls.lib.wi.us>, (608) 266-6348
participants (3)
-
Erik Lewis -
Greg Barniskis -
Magnus Enger