Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
Could someone please point me where did I go wrong?
I've an apps using PHP and mysql. The thing is, we are using some file uploader plugins that require us to save the unique id that has format something like this a41ddc78-3fee-4bf3-88c1-83028ae22f1. At some point, I need to select data from the database using this fields and as you can see, I can't get the field when I do manual query on it. any help is appreciate on how to solve this problem. Thank you
SELECT * FROM product_image WHERE unique_id = 'a41ddc78-3fee-4bf3-88c1-83028ae22f1'
the query works fine...
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
i know that has to be a trivial one. Can please somebody tell me how only to get the value of skills? how can i access it?
Appreciate.
You have different options to choose from:
In plain PHP you can do:
$skills = array_map(function($entry) {
return $entry->skills;
}, $arr);
With Laravel helpers you can do:
Arr::pluck($arr, 'skills');
Your data looks like models so in that case, you might be able to do this as well:
YourModel::get()->pluck('skills'); //or
$yourCollection->pluck('skills');
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I am trying to create an image that changes dependent on the genre grabbed from an icecast server, I am pretty sure I have the base code correct I think I've just incorrectly inputted the PHP variable.
<?php
$stats = $core->radioInfo( "http://http://sc.onlyhabbo.net:8124/status-json.xsl" );
?>
<img src=http://www.habbo.com/habbo-imaging/avatarimage?user=<?php
echo $stats['genre'];
?>&action=std&direction=2&head_direction=2&gesture=sml&size=m&img_format=gif/>
is the full code. Have I inputted the PHP variable incorrectly
Where are the quotes in your Html?
<img src="http://www.habbo.com/habbo-imaging/avatarimage?user=<?php
echo $stats['genre'];
?>&action=std&direction=2&head_direction=2&gesture=sml&size=m&img_format=gif"/>
UPDATE EVERYBODY
This is now resolved, I decided to go down the CURL route for this, and at first it didn't work until my host raised our CloudLinux Process Limit. I am unsure what the actual issue with this code was, but the CURL route works fine. Thank you for any answers
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I get this error while trying to update. The query works in phpmyadmin just fine.
Was a bind error, all fixed thanks to the great people here.
That's because you've got typo in your parameters.
You are using :serreceivetxt instead of :userreceivetxt and :serreceiveemail instead of :userreceiveemail.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes===".$card['id']."") as $kat){
echo (kat['id_categories']);
}
table cols and values are all matched, something is wrong in this part of code
I tried adding $ before kat and using only one "=", sill doesnt work
NEW LINK
http://pastebin.com/RPK7vEaJ
this
where id_kartes===".$card['id']."
would be
where id_kartes=".$card['id']."
and missing $
echo $kat['id_categories'];
so full code :-
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes='".$card['id']."'") as $kat){
echo $kat['id_categories'];
}
best practice if you store your query result in a variable and loop over this variable.
foreach($db->fetch_array("SELECT id_categories FROM csn_categories_join_kartes where id_kartes=".$card['id']."") as $kat)
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I have a form with a textbox with name="name".
In my code, I use a direct image hosted on another website in the format:
$grav_url = "http://yourwebsitehere.com/avatarimage.php?username=YourUsername";
I want the YourUsername part to be replaced with the input of the textbox.
For this to work, i'm trying the following code:
$grav_url = "http://yourwebsitehere.com/avatarimage.php?username="+ $_POST['name'];
What am I doing wrong? PHP noob here
in php . is used for concatenate string not +
here try this
$grav_url = "http://yourwebsitehere.com/avatarimage.php?username=".$_POST['name'];