Jump to content

Simple query


grlayouts

Recommended Posts

Few things..

1) Look into your database.  What "type" of field is "uSkillsMax"?  Is it an "int"?  If so change it to a "VARCHAR"

 

2) In this line you have the numbers listed so they are technically integers...

$details = 100 . '-' . 10 . '-' . 3; 

Instead do this..

$details = strval(100)."-".strval(10)."-".strval(3); 

OR this..

$details = "100"."-"."10"."-"."3"; 

Try those out and let me know what you come up with

Link to comment
https://forums.phpfreaks.com/topic/229513-simple-query/#findComment-1182486
Share on other sites

$details is a string and string data must be enclosed in single-quotes in a query, otherwise your string looks like a mathematical expression.

 

$sql = "UPDATE usertable SET uSkillsMax='$details'";

 

Edit: Don't make this harder than it really is.

Link to comment
https://forums.phpfreaks.com/topic/229513-simple-query/#findComment-1182487
Share on other sites

i dont get it?

I love how user "litebearer" takes the time to post you a link and if you look at the difference between his post time and that of the OP (grlayouts) he spent all of 1 minute 44 seconds looking at the link provided by litebearer only to quickly respond with a "i dont get it?"

Link to comment
https://forums.phpfreaks.com/topic/229513-simple-query/#findComment-1182489
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.