SQl help me please
#1

hello i have
in GameModInt
PHP код:
    for(new i=0;i!= MAX_PANELSi++){
          
format(querysizeof(query), "INSERT INTO `para` (zID, pnText, pnX, pnY, pnZ, pnRX, pnRY, pnRZ) VALUES ('0', 'Vide', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00')");
         
mysql_tquery(MySQLquery);
    } 
i have the table but nothing is created ,,?
Quote:

MySQL returned an empty result set (i.e. zero rows). (Query took 0.0010 sec)

Reply
#2

Use this and run the query, then look in the server log and copy/paste the result here.
Also, if possible, give us a screenshot of your mysql table design.

PHP код:
for(new i=0;i!= MAX_PANELSi++)
{
    
format(querysizeof(query), "INSERT INTO `para` (zID, pnText, pnX, pnY, pnZ, pnRX, pnRY, pnRZ) VALUES ('0', 'Vide', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00')");
    
mysql_tquery(MySQLquery);
    
printf(query); // It will print out the querry in the server log

Reply
#3

Yeah *-*
it's work but
PHP код:
[18:45:37] [MYSQL]
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00')
[
18:45:37INSERT INTO `para` (zIDpnTextpnXpnYpnZpnRXpnRYpnRZVALUES ('0''Vide''0.00''0.00''0.00''0.00''0.00''0.00'




my .sql file


PHP код:
CREATE TABLE IF NOT EXISTS `para` (
  `
pnIDint(10NOT NULL AUTO_INCREMENT,
  `
pnTextvarchar(24NOT NULL,
  `
pnXfloat NOT NULL,
  `
pnYfloat NOT NULL,
  `
pnZfloat NOT NULL,
  `
pnRXfloat NOT NULL,
  `
pnRYfloat NOT NULL,
  `
pnRZfloat NOT NULL,
  
PRIMARY KEY (`pnID`)
ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=15 
Reply
#4

I think pnID should be changed to zID in the table.

Do this and let me know if it worked.
Reply
#5

zID to pnID lool thank you
Reply
#6

Код:
for(new i=0;i!= MAX_PANELS; i++)
{
    format(query, sizeof(query), "INSERT INTO `para` (pnID, pnText, pnX, pnY, pnZ, pnRX, pnRY, pnRZ) VALUES ('0', 'Vide', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00')");
    mysql_tquery(MySQL, query);
}
Edit: Late
Reply
#7

Quote:
Originally Posted by Azula
Посмотреть сообщение
zID to pnID lool thank you
I take it that it worked ?
Reply
#8

yeah */-* thanks
Reply
#9

My pleasure , if you need help with something else related to pawn or MySQL feel free to PM me. If I can, I'll help.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)