Forum Moderators: coopster

Message Too Old, No Replies

Insert syntax

code doesn't work

         

russgri

6:36 am on Oct 15, 2004 (gmt 0)

10+ Year Member



The image is activated in a placeholder but will not show...
maybe it is the layer that shows...anyway the placeholder is white tho i don't know where the white comes from.
This is on a black background and the image has a transparent white background. so I cant really tell.
Is this the proper syntax to use when using a image in mysql?

INSERT INTO es_layers (id, _left, top, width, height, align, valign, zorder, bgcolor, padding, style, content, page_id, title, site_key, anchor, img_thumb, img_thumb_path, img_large, img_large_path, img_anchor, img_link) VALUES (4, 0, 0, 100, 75, 'center', 'top', 100, '', 0, 'normal', '<img src="images/foxhuntingworld.gif" width="623" height="75" alt="" border="0" ', 0, '', 'default', '', '', '', '', '', '', '');

mincklerstraat

8:05 am on Oct 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your problem might be here:
INSERT INTO es_layers (id, _left, top, width, height, align, valign, zorder, bgcolor, padding, style, content, page_id, title, site_key, anchor, img_thumb, img_thumb_path, img_large, img_large_path, img_anchor, img_link) VALUES (4, 0, 0, 100, 75, 'center', 'top', 100, '', 0, 'normal', '<img src="images/foxhuntingworld.gif" width="623" height="75" alt="" border="0" />', 0, '', 'default', '', '', '', '', '', '', '');

The bit above in red was not in your original code. It could be your script leaves this out of the db and put in the end part by 'echoing' it so you can switch from html to xhtml syntax if you want. You can either keep your insert syntax as is, and manually echo '>' or ' />' after outputting the img src string, or change the syntax to above (above is for xhtml).

Use firefox as a browser and for this kind of thing, select the part of your page that looks weird, click-right, and hit 'show selection source.' This will show you the html part of what's wrong there.