/    Sign up×
Community /Pin to ProfileBookmark

Select description using VID

Code is
function insert_thumb_path($options)
{
global $config;

$vid = $options[‘vid’];
$index = intval( ($vid – 1) / $config[‘max_thumb_folders’] );
$tmb_folder = ‘tmb’;
if ($index !== 0) {
$tmb_folder = ‘tmb’.$index;
}
$get_posts= “SELECT * FROM description WHERE ‘$vid’ “;
$run_posts = mysqli_query($con,$get_posts);

$output = $get_posts;

return $output;

}
but i am getting error
[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-06-17/1560784052-817964-1560780604-737396-capture3.png]
my sql databse is
[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-06-17/1560784080-536678-1560780618-693316-capture.png]
look at my vid
[upl-image-preview url=https://www.webdeveloper.com/assets/files/2019-06-17/1560784137-292259-1.png]

to post a comment
PHP

16 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmJun 17.2019 — And your question/problem is???

What does "but i am getting error" mean? I don't see any error message.
Copy linkTweet thisAlerts:
@ginerjmJun 17.2019 — I think I will stop reading your posts. Nothing I have read by you makes any sense to this old guy.
Copy linkTweet thisAlerts:
@adityaauthorJun 17.2019 — @ginerjm#1604890 hey you can see error because look at this <img> Tag i want to show description url
Copy linkTweet thisAlerts:
@adityaauthorJun 17.2019 — @ginerjm#1604891 look at database vid 768 description http://img-... link want to show on page
Copy linkTweet thisAlerts:
@adityaauthorJun 17.2019 — my result out come <img src="SELECT * FROM description WHERE '$vid"> that is error

sql not work may be sql command error.

we need current link <img src="http://img-..."> anyone can change the line $get_posts


Copy linkTweet thisAlerts:
@adityaauthorJun 17.2019 — @ginerjm#1604891 hey no idea you have so you are ignore
Copy linkTweet thisAlerts:
@ginerjmJun 17.2019 — Do you have any knowledge how to write HTML tags? You cannot put an sql query statement in as the src attribute of an img tag! What are you thinking? You are mixing PHP/SQL with HTML.
Copy linkTweet thisAlerts:
@adityaauthorJun 17.2019 — @ginerjm#1604896 i am talked about <img > tag not HTML tags? You have no knowledge what i am writing
Copy linkTweet thisAlerts:
@ginerjmJun 17.2019 — An image tag (<img>) IS Html
Copy linkTweet thisAlerts:
@adityaauthorJun 18.2019 — no one can answer give me but i will be giving answer find answer within 24 hours

function insert_thumb_path($options)

{


global $conn;

$vid = intval($options['vid']);
$sql = "SELECT description FROM video WHERE VID = " .$vid. " LIMIT 1";
$output = $conn->execute($sql);

return $output->fields['description'];















}
Copy linkTweet thisAlerts:
@ginerjmJun 18.2019 — Now I have seen everything. A user who "likes" their own post!!!

Copy linkTweet thisAlerts:
@cootheadJun 18.2019 — > @ginerjm#1604960
>
>[color=#069] Now I have seen everything. A user who "likes" their own post!!![/color]



It's either a flaw in the forum software or a forum policy to cater

for members with narcissistic tendencies. 😀

_coothead_
Copy linkTweet thisAlerts:
@schonheJun 19.2019 — @aditya#1604918 it is very helpful sql
Copy linkTweet thisAlerts:
@schonheJun 19.2019 — @ginerjm#1604960 you are not knowledge aditya is asking about sql and php not html
Copy linkTweet thisAlerts:
@shophieJun 19.2019 — @aditya#1604918 thanks aditya working
Copy linkTweet thisAlerts:
@ginerjmJun 19.2019 — I am happy that you found the answer that solved your problem, even tho it wasn't posted here.
×

Success!

Help @aditya spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...