[PHP] Please help me with a query
First of all I'm sorry for my english I don't know speak very well, I will try to explain it, I hope you understain what I need. I have two tables: centers and peoples, in table centers I have the centers values and in table peoples I have the peoples values and in table columns center the id corresponding the center. db: centers id nameccorreoc telc 1 Cienfuegos [EMAIL PROTECTED] 4534345 2 Havana [EMAIL PROTECTED] 4643765 3 Santiago[EMAIL PROTECTED] 3453453 peoples idnamed center correod cargod 1 Albert 1 [EMAIL PROTECTED] sfgsdfgsdfgsdfg 2 Julio1 [EMAIL PROTECTED] sadfsgfdsfgfdsg 3 Sussan 2 [EMAIL PROTECTED] gjfhjfhjfhjfg 4 Peter2 [EMAIL PROTECTED] fgjhfgjgfjhjjghj And the query and script to generate the tables for each centers list is: $centers = mysql_query(SELECT namec FROM centers ORDER BY idc asc, $connect); while ($centerss = mysql_fetch_array($centers, MYSQL_ASSOC)) { echo table border=1; echo tr; echo td width=265 height=20 align=center valign=middle.$centerss['namec']./td; echo td width=265 height=20 align=center valign=middlea href=mailto:.$centerss['correoc']..$centerss['correoc']./a/td; echo td width=265 height=20 align=center valign=middle.$centerss['telc']./td; echo /tr; echo /tablep/p; } mysql_free_result($centers); That's generate one table with one row and three columns for each center, but, I would like to generate more rows and 3 columns in each table with the named, correod and cargod of peoples corresponding the center, I mean, print the centers values with the peoples corresponding this center, in one table each one. I hope you understaind what I need, if not polease let me know. regards Alain -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] arrays
if I have two arrays, example: $a = array (one, two, three, four, two); $b = array (seven, one, three, six, five); How can I get in another variable a new array with the same elements into $a and $b. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio.
[PHP] Hosting php help
Please I need a free hosting with php and mysql, and sendmail active. If you know any site, please send to me the address. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio.
[PHP] URL problem
I have a following directory: - folder (site) index.php - folder (example) index.php the url to this directory will be: http://www.example.com/site/index.php but I need redirect with: header() function to the index.php inside the folder example without the url change I mean, I want to keep the same url but diferent directory -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio.
[PHP] HAPPY NEW YEAR!!
Happy New Year for all. I weish you the best in this new 2006. Regards. Alain -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio.
[PHP] I want to know if some link is online
I would like to know if a web is online, a have this code: enlace.php ? $vivo = verde.gif; $muerto = rojo.gif; $enlinea = fopen($enlace, r); if (!$enlinea){ header(Location: $muerto); } else { header(Location: $vivo); } fclose($enlinea); ? In other page I hve this: page.php img src=estado.php?enlace=http://www.cfg.jovenclub.cu; Somebody can tell me what it's wrong, because the image did not show, of course that the pages and bouth image are in the same dorectory. Please any suggestion -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql query
I have a table colum in mysql with two fields: day and month. I would like to know if it's possible to make a query where I can determine if exist days before to a selected day, for example: if I have in my table: day 19 - month 05, I wish to know if there are previous days inserted at the 19, the days they are not inserted in the table, they are inserted according your selection, what I want to get is that every time that you insert a day, I want to check if there are days previous to the one already inserted in the table in the same month, in case that there are not them then they owe you to insert together with the one selected, I wait they understand me what I want: I work php/mysql. sorry for my english i'm cuban Thank you and excuse the nuisances -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] edit $variable online?
Hi, I have in a php page one ($variable = 85), I woud like to change the value from this variable online, without any data base, for example ussing a form where I can put the new value and it change the value of the $variable. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Insert one or many chekbox values in a db mysql
Hi, I have 5 chekboxes in a page, I would like insert the values of all chekboxes checked in a mysql db. -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with a bucle
Hi, i have in my mysql db one table columm, some think like this: dayreporte ------ 145 256 478 689 790 etc... How can i print all the value from 'reporte' columm depending the 'day' columm, and if there is not exist a day print 0 value, for example: day 1 - reporte 45 day 2 - reporte 56 day 3 - 0 day 4 - reporte 78 day 5 - 0 etc... Sorry for my english -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with print value
Sorry for my english, i'm cuban, it's dificult for me explain that in english but I'll try: I have a table columns: month, day and value ||month||day||value 7 156 7 334 8 450 9 578 . . . . . . etc... I need to get the value for every day, for example: for day 1 the value is 56 for day 3 the value is 67 for day 4 the value is 50 did you understain, please helpe me -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with ORDER BY query
I have a query: $query = mysql_query(SELECT event FROM table WHERE month = 'x' ORDER BY day ASC); I have all days of the month insert in day field: 1, 2, 3, 4, 5 ... when I print the query: if ($query_r = mysql_fetch_array($query)) { do { echo td width='8%'.$query_r['event']./td\n; } while ($query_r = mysql_fetch_array($query)); echo /tr \n; } else { echo No se encontraron registros; } It print all result of the query, less day 1 What it's the problem -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] print value from db
Hi, I have a table with: month, day, year, value I need to print every value corresponding to a day, for example: value[day1], if exist.. value[day2], if exist.. vale... etc It is possible? -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] function MAX with WHERE
I have someting like this: $test = mysql_query(SELECT MAX(dato) AS datos FROM tabla WHERE campo_mes = '$mes'); $test_m = mysql_fetch_array($test); $test_mes = $test_m['datos']; print $test_mes where $mes is a value I need to know if something its wrong, because I don't recive any error, but I see nothing -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Don't ejecute a sentence if a field is empty
Hello I'm new: I need to know how can I stop a php sentence if my db is empty, for example I have writed a php sentence, if every fields from mmy db are full, there is no problem, but I delete every values from the all fields in my db when I ejecute my script mysql give me an error, Ej: $fecha = mysql_query(SELECT event_day, event_month, event_year FROM $db_table WHERE event_title = $dia_maximo); $fecha_max = mysql_fetch_array($fecha); $fecha_maxima = $fecha_max['event_day']; $diames_maximo = $fecha_max['event_month']; wehen I ejecute the script the error message is it: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/www/cfg/prueba/calendar_este2/index.php on line 277 sorry for my english, I'm cuban -- Este mensaje ha sido analizado por MailScanner en busca de virus y otros contenidos peligrosos, y se considera que está limpio. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php