ricod1996

varsToMySQL

Feb 11th, 2013
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.60 KB | None | 0 0
  1. stock changeintomysql(BizID)
  2. {
  3.     new Float:x = BizInfo[BizID][biz_x], Float:y = BizInfo[BizID][biz_y], Float:z = BizInfo[BizID][biz_z], name[128], preis = BizInfo[BizID][biz_preis], besitzer[128], innenraum = BizInfo[BizID][biz_innenraum];
  4.     mysql_real_escape_string(BizInfo[BizID][biz_name], name);
  5.     mysql_real_escape_string(BizInfo[BizID][biz_besitzer], besitzer);
  6.     new query[512];
  7.     format(query, sizeof(query), "INSERT INTO 'bisz' ('BizdID', 'x', 'y', 'z', 'name', 'preis', 'besitzer', 'innenraum') VALUES (%d, %f, %f, %f, '%s', %d, '%s', %d)", BizID, x, y, z, name, preis, besitzer, innenraum);
  8.     return 1;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment