开发者

extract from database if key contatin string in SQL 2008using c#

开发者 https://www.devze.com 2022-12-31 20:36 出处:网络
I have a table with 开发者_开发知识库two columns - the key contains the image name, like love_me.jpg.The second column contains the link for this image (IE: http:\\...\\love_me.jpg).

I have a table with 开发者_开发知识库two columns - the key contains the image name, like love_me.jpg. The second column contains the link for this image (IE: http:\...\love_me.jpg).

I want a query that will extract the link if I search using only "love".


The SQL command is pretty basic.

string sqlQuery = "SELECT imagelink FROM Dataimages where (imagename like '%" + keywords + "%')"

As for the C# part, that will depend a lot on where the data is located, what type of database it's in and what you want to do with the data once you've obtained it.

0

精彩评论

暂无评论...
验证码 换一张
取 消