Pls make this code

Started on the old forum in August 2012 · view the original in the archive · old links redirect here

8 replies · 706 views · started 14 years ago · 1 min read

4 participants
Gauravraj Newbie · 7 posts #1

Pls this code is for point transfer from publisher to advertise but this code unable to transfer correct this pls.

<?php
$getu = mysql_query("SELECT * FROM users WHERE user='$user'");
$getu1 = mysql_fetch_array($getu); 
$id = $getu1['id'];
$bal = $getu1['bal'];
$pnt = $getu1['point'];

$getu = mysql_query("SELECT * FROM comp WHERE id='$id'");
$getu1 = mysql_fetch_array($getu); 
$id = $getu1['id'];
$point = $getu1['point'];

$ua = mysql_query("UPDATE comp SET point=(point+$pnt) WHERE id='$id'");
			$up = mysql_query("UPDATE users SET points=(pnt-$point) WHERE id='$id'");
?> 
<div class='cons1'>
<form action='transfer.php' method='post'>
<b>Amount:</b><br/><input type='text' name='point' id='point' value='10'/><br/>
<div align='right'><input type='submit' name='Pub2Adv' id='Pub2Adv' value='Transfer'/></div>
</form></div>
RTS Newbie · 3 posts #2

u missing $ sign [ **$**point+$pnt , **$**pnt-$point]... is this typo ??

mFreak Developer · 66 posts #3

RTS wrote: u missing $ sign [ **$**point+$pnt , **$**pnt-$point]... is this typo ??

its not typo. Those are mysql table field names.

$("#mfreak").find(".head brain").clone();

Progress:

[|||___________________________] : 5%

Output:

Memory limit reached, unable to complete operation.

Support answer:

Try using a super uber strong mega computer to reach at least 10%.

👋

mFreak Developer · 66 posts #5

Gauravraj wrote: Pls this code is for point transfer from publisher to advertise but this code unable to transfer correct this pls.

<?php
$getu = mysql_query("SELECT * FROM users WHERE user='$user'");
$getu1 = mysql_fetch_array($getu); 
$id = $getu1['id'];
$bal = $getu1['bal'];
$pnt = $getu1['point'];


$getu = mysql_query("SELECT * FROM comp WHERE id='$id'");
$getu1 = mysql_fetch_array($getu); 
$id = $getu1['id'];
$point = $getu1['point'];

$ua = mysql_query("UPDATE comp SET point=(point+$pnt) WHERE id='$id'");
			$up = mysql_query("UPDATE users SET points=(pnt-$point) WHERE id='$id'");
?> 
<div class='cons1'>
<form action='transfer.php' method='post'>
<b>Amount:</b><br/><input type='text' name='point' id='point' value='10'/><br/>
<div align='right'><input type='submit' name='Pub2Adv' id='Pub2Adv' value='Transfer'/></div>
</form></div>

could you post table structure for comp and users table,that second sql. Are you sure that that script dont show an error? It dont make sense. Where do you fetch post data?

$("#mfreak").find(".head brain").clone();

Progress:

[|||___________________________] : 5%

Output:

Memory limit reached, unable to complete operation.

Support answer:

Try using a super uber strong mega computer to reach at least 10%.

👋

Gauravraj Newbie · 7 posts #6

This is ad4earn sql file but in this sql there is no structure for points in comp maybe i have manually created in comp pls help.

-- Table structure for table `comp`
--

CREATE TABLE IF NOT EXISTS `comp` (
  `id` int(100) NOT NULL auto_increment,
  `title` varchar(50) NOT NULL,
  `uid` int(50) NOT NULL,
  `url` varchar(50) NOT NULL,
  `type` int(1) NOT NULL,
  `adult` int(1) NOT NULL default '0',
  `img` varchar(200) NOT NULL,
  `cat` text NOT NULL,
  `lang` tinytext NOT NULL,
  `intr1` tinytext NOT NULL,
  `intr2` tinytext NOT NULL,
  `intr3` tinytext NOT NULL,
  `intr4` tinytext NOT NULL,
  `intr5` tinytext NOT NULL,
  `st` int(1) NOT NULL default '0',
  `ckey` varchar(250) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
Guest #7

im confused do you just want points on the comp table?

-- Table structure for table `comp`
--

CREATE TABLE IF NOT EXISTS `comp` (
`id` int(100) NOT NULL auto_increment,
`title` varchar(50) NOT NULL,
`uid` int(50) NOT NULL,
`url` varchar(50) NOT NULL,
`type` int(1) NOT NULL,
`point` varchar(50) NOT NULL default '0',
`adult` int(1) NOT NULL default '0',
`img` varchar(200) NOT NULL,
`cat` text NOT NULL,
`lang` tinytext NOT NULL,
`intr1` tinytext NOT NULL,
`intr2` tinytext NOT NULL,
`intr3` tinytext NOT NULL,
`intr4` tinytext NOT NULL,
`intr5` tinytext NOT NULL,
`st` int(1) NOT NULL default '0',
`ckey` varchar(250) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

that should work

Gauravraj Newbie · 7 posts #8

leigh17 wrote: im confused do you just want points on the comp table?

-- Table structure for table `comp`
--

CREATE TABLE IF NOT EXISTS `comp` (
`id` int(100) NOT NULL auto_increment,
`title` varchar(50) NOT NULL,
`uid` int(50) NOT NULL,
`url` varchar(50) NOT NULL,
`type` int(1) NOT NULL,
`point` varchar(50) NOT NULL default '0',
`adult` int(1) NOT NULL default '0',
`img` varchar(200) NOT NULL,
`cat` text NOT NULL,
`lang` tinytext NOT NULL,
`intr1` tinytext NOT NULL,
`intr2` tinytext NOT NULL,
`intr3` tinytext NOT NULL,
`intr4` tinytext NOT NULL,
`intr5` tinytext NOT NULL,
`st` int(1) NOT NULL default '0',
`ckey` varchar(250) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

that should work

Ya i make it points table but i want points transfer working.

mFreak Developer · 66 posts #9

Gauravraj wrote: Pls this code is for point transfer from publisher to advertise but this code unable to transfer correct this pls.

<?php
$getu = mysql_query("SELECT * FROM users WHERE user='$user'");
$getu1 = mysql_fetch_array($getu); 
$id = $getu1['id'];
$bal = $getu1['bal'];
$pnt = $getu1['point'];


$getu = mysql_query("SELECT * FROM comp WHERE id='$id'");
$getu1 = mysql_fetch_array($getu); 
$id = $getu1['id'];
$point = $getu1['point'];

$ua = mysql_query("UPDATE comp SET point=(point+$pnt) WHERE id='$id'");
			$up = mysql_query("UPDATE users SET points=(pnt-$point) WHERE id='$id'");
?> 
<div class='cons1'>
<form action='transfer.php' method='post'>
<b>Amount:</b><br/><input type='text' name='point' id='point' value='10'/><br/>
<div align='right'><input type='submit' name='Pub2Adv' id='Pub2Adv' value='Transfer'/></div>
</form></div>

I was just reading ad4earns sql, and I dont see that 'pnt' column in users table. Maybe you were thinking about 'point'. Try changing that it should solve your problem.

$("#mfreak").find(".head brain").clone();

Progress:

[|||___________________________] : 5%

Output:

Memory limit reached, unable to complete operation.

Support answer:

Try using a super uber strong mega computer to reach at least 10%.

👋

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close