Find Jobs
Hire Freelancers

45731 Stupid Problem

N/A

Concluído
Publicado há mais de 18 anos

N/A

Pago na entrega
Need help with what I am attempting to do. I am attempting to do a simple if statement in PHP relating to Mysql, however it's not working properly. here's what I am basically doing: using this select command to count the number of rows affected. if there is 1 or more (not null), it should run the update, if there is none, then it should run the insert. simple and basic I'm just losing my mind. and am stuck in VBSCRIPT LAND, I am missing what I am doing wrong here. $ctr = "SELECT * FROM `selections` WHERE `name` = '" . $gnme . "' AND `week` LIKE '" . $week . "'" $ctr2 = mysql_query($ctr) or die(mysql_error()) if ($ctr2) { /* This section is to be used if for the selected week there is no entry for the name provided */ $query = "INSERT INTO selections VALUES ('$gnme','$gme1','$gme2','$gme3','$gme4','$gme5','$gme6','$gme7','$gme8','$gme9','$gme10','$gme11','$gme12','$gme13','$gme14','$gme15','$gme16','$gme17','$gme18','$gme19','$week','$gscor')" mysql_query($query) echo "Your Picks have been posted." } else // If there is a - I will complete the Update command, just annoyed with other part. { update query here.... } would appreciate the help getting frustrated, also to pay immediately I can only do 2, but by the end of the weekend I will provide the remainder. need by morning if at all possible.
ID do Projeto: 1795061

Sobre o projeto

1 proposta
Projeto remoto
Ativo há 12 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
As Discussed --James
$5 USD em 0 dia
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a)
4,2
47
Membro desde dez. 21, 2003

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.