Sedang Disiapkan

221607 Quick php/mysql script

Hi I need some quick php help. I have partial syntax ready for the first php and need the syntax for the second constructed.

I know this is quick b/c I had a friend helping me over the chat with my initial request (already completed)

I need to manipulate some data in sql tables using php.

The first one is (I know the syntax is incorrect which is why i need you! I think you should be able to understand my logic though):

----

<?php

global $database;

$sql = " SELECT * FROM jos_acajoom_subscribers WHERE {

user_id NOT ='0'" AND user_id NOT FOUND in jos_jcs_user_subscr

$sql = mysql_query($sql);

while ($row=mysql_fetch_array($sql)){

$change = "INSERT INTO jos_acajoom_queue (`subscriber_id`, `list_id`) VALUES ('$row[id]','9')";

$insert=mysql_query($insert);

}

echo "non-students user_id changed to list 9";

?>

----

Second php...I don't even want to try to do a sql statement here b/c I think I would confuse you...so I have written it in logic.....

If TABLE jos_jcs_user_subscr FIELD user_id AND FIELD extime is greater than TODAY DATE & is not in TABLE jos_acajoom_queue where list_id = 1, then add entry for list_id = 1 and delete any entries (rows) for list 9 & 8

If TABLE jos_jcs_user_subscr FIELD user_id AND FIELD extime is less than TODAY DATE & is not in TABLE jos_acajoom_queue where list_id = 9, then add entry for list_id = 9 and delete any entries for list 1 & 8

If TABLE jos_acajoom_queue FIELD user_id list_id = 8 and there is an entry for same user_id list_id 9 then delete the entry for list_id 9

echo "all lists scrubbed"

---------

The three table structures are attached in text file

---------

I already know how to run the code....as I said in the beginning I just need the statement correctly constructed.

Thanks

Kemahiran: Semua Boleh, MySQL, PHP

Lihat lebih lanjut: why data structures, lists in data structures, lists data structures, list in data structures, list data structures, is incorrect, data structures lists, data structures list, sql less than, row b, php help, need a quick mysql script, chat table, chat php code, php code entry mysql database, mysql select statement, rows insert, amp php mysql, mysql delete, php select insert sql, php insert select, php delete mysql row, mysql delete using, delete mysql tables, sql statement help

Tentang Majikan:
( 27 ulasan ) Coral Gables, United States

ID Projek: #1967842

Dianugerahkan kepada:

infysecdotcom

Ready do assist via MSN or any other IM.

$33 USD dalam 0 hari
(224 Ulasan)
6.7